You've already forked dotfiles
feat: A working state during the transfer between the old neovim
configurations and using newer built-in functionality in the 0.12.x versions of Neovim. Further work is needed for treesitter updates, cleanup of the conversion work and testing to verify old functionality isn't lessened to get the benefits of a cleaner config and vastly faster load times.
This commit is contained in:
@@ -1,148 +1,63 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
config = function(_, opts)
|
||||
local telescope = require('telescope')
|
||||
local actions = require('telescope.actions')
|
||||
local action_state = require('telescope.actions.state')
|
||||
local fb_actions = telescope.extensions.file_browser.actions
|
||||
vim.pack.add({
|
||||
'https://github.com/kevinhwang91/nvim-bqf',
|
||||
'https://github.com/nvim-telescope/telescope-file-browser.nvim',
|
||||
'https://github.com/nvim-lua/plenary.nvim',
|
||||
'https://github.com/nvim-telescope/telescope.nvim',
|
||||
})
|
||||
|
||||
opts.defaults = {
|
||||
file_ignore_patterns = {
|
||||
'.png$',
|
||||
'.jpg$',
|
||||
'.jpeg$',
|
||||
'.ico$',
|
||||
'.icns$',
|
||||
'.webp$',
|
||||
'.uproject$',
|
||||
'-workspace$',
|
||||
'.git/',
|
||||
'.node_modules/',
|
||||
'node_modules',
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
'.png$',
|
||||
'.jpg$',
|
||||
'.jpeg$',
|
||||
'.ico$',
|
||||
'.icns$',
|
||||
'.webp$',
|
||||
'.uproject$',
|
||||
'-workspace$',
|
||||
'.git/',
|
||||
'.node_modules/',
|
||||
'node_modules',
|
||||
},
|
||||
layout_config = { prompt_position = 'bottom' },
|
||||
-- layout_strategy = 'vertical',
|
||||
mappings = {
|
||||
i = {
|
||||
['<ESC>'] = require('telescope.actions').close,
|
||||
},
|
||||
layout_config = { prompt_position = 'bottom' },
|
||||
layout_strategy = 'vertical',
|
||||
mappings = {
|
||||
i = {
|
||||
['<ESC>'] = actions.close,
|
||||
},
|
||||
},
|
||||
prompt_prefix = ' ',
|
||||
results_title = false,
|
||||
selection_caret = '➤ ',
|
||||
sorting_strategy = 'ascending',
|
||||
winblend = 0,
|
||||
}
|
||||
|
||||
opts.pickers = {
|
||||
diagnostics = {
|
||||
-- theme = 'ivy',
|
||||
initial_mode = 'normal',
|
||||
layout_config = {
|
||||
preview_cutoff = 9999,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
opts.extensions = {
|
||||
file_browser = {
|
||||
theme = 'dropdown',
|
||||
hijack_netrw = true,
|
||||
mappings = {
|
||||
['n'] = {
|
||||
['N'] = fb_actions.create,
|
||||
['h'] = fb_actions.goto_parent_dir,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
telescope.setup(opts)
|
||||
telescope.load_extension('file_browser')
|
||||
end,
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope-file-browser.nvim',
|
||||
'kevinhwang91/nvim-bqf',
|
||||
},
|
||||
prompt_prefix = ' ',
|
||||
results_title = false,
|
||||
selection_caret = '➤ ',
|
||||
sorting_strategy = 'ascending',
|
||||
winblend = 0,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
';f',
|
||||
function()
|
||||
require('telescope.builtin').find_files({
|
||||
no_ignore = false,
|
||||
hidden = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
';r',
|
||||
function()
|
||||
require('telescope.builtin').live_grep()
|
||||
end,
|
||||
},
|
||||
{
|
||||
';b',
|
||||
function()
|
||||
require('telescope.builtin').buffers()
|
||||
end,
|
||||
},
|
||||
{
|
||||
';h',
|
||||
function()
|
||||
require('telescope.builtin').help_tags()
|
||||
end,
|
||||
},
|
||||
{
|
||||
';;',
|
||||
function()
|
||||
require('telescope.builtin').resume()
|
||||
end,
|
||||
},
|
||||
{
|
||||
';d',
|
||||
function()
|
||||
require('telescope.builtin').diagnostics()
|
||||
end,
|
||||
},
|
||||
{
|
||||
';t',
|
||||
function()
|
||||
require('telescope.builtin').treesitter()
|
||||
end,
|
||||
},
|
||||
{
|
||||
';s',
|
||||
function()
|
||||
require('telescope.builtin').lsp_document_symbols()
|
||||
end
|
||||
},
|
||||
{
|
||||
';w',
|
||||
function()
|
||||
require('telescope.builtin').lsp_dynamic_workspace_symbols()
|
||||
end
|
||||
},
|
||||
{
|
||||
';e',
|
||||
function()
|
||||
local telescope = require('telescope')
|
||||
|
||||
local function telescope_buffer_dir()
|
||||
return vim.fn.expand('%:p:h')
|
||||
end
|
||||
|
||||
telescope.extensions.file_browser.file_browser({
|
||||
path = '%:p:h',
|
||||
cwd = telescope_buffer_dir(),
|
||||
respect_gitignore = false,
|
||||
hidden = true,
|
||||
grouped = true,
|
||||
previewer = false,
|
||||
initial_mode = 'normal',
|
||||
layout_config = { height = 40 },
|
||||
})
|
||||
end,
|
||||
pickers = {
|
||||
diagnostics = {
|
||||
-- theme = 'ivy',
|
||||
initial_mode = 'normal',
|
||||
layout_config = {
|
||||
preview_cutoff = 9999,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set('n', ';f', function()
|
||||
builtin.find_files({
|
||||
no_ignore = false,
|
||||
hidden = true,
|
||||
})
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', ';r', function() builtin.live_grep() end)
|
||||
vim.keymap.set('n', ';b', function() builtin.buffers() end)
|
||||
vim.keymap.set('n', ';h', function() builtin.help_tags() end)
|
||||
vim.keymap.set('n', ';;', function() builtin.resume() end)
|
||||
vim.keymap.set('n', ';d', function() builtin.diagnostics() end)
|
||||
vim.keymap.set('n', ';t', function() builtin.treesitter() end)
|
||||
vim.keymap.set('n', ';s', function() builtin.lsp_document_symbols() end)
|
||||
vim.keymap.set('n', ';w', function() builtin.lsp_dynamic_workspace_symbols() end)
|
||||
|
||||
Reference in New Issue
Block a user