vim: make proper use of dependencies
in lazy.nvim
This commit is contained in:
parent
86ab3f7dfe
commit
7a1b29f62c
4 changed files with 32 additions and 34 deletions
|
@ -75,11 +75,15 @@ local config = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ 'hrsh7th/nvim-cmp', config = config },
|
'hrsh7th/nvim-cmp',
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'hrsh7th/cmp-nvim-lua',
|
config = config,
|
||||||
'hrsh7th/cmp-path',
|
dependencies = {
|
||||||
'hrsh7th/cmp-buffer',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
'onsails/lspkind-nvim',
|
'hrsh7th/cmp-nvim-lua',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
'hrsh7th/cmp-buffer',
|
||||||
|
'onsails/lspkind-nvim',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,12 @@ local config = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ 'neovim/nvim-lspconfig', config = config },
|
'neovim/nvim-lspconfig',
|
||||||
|
|
||||||
'williamboman/mason.nvim',
|
config = config,
|
||||||
'williamboman/mason-lspconfig.nvim',
|
dependencies = {
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,8 @@ local config = function()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
telescope.load_extension 'file_browser'
|
||||||
|
|
||||||
local selected_range = function()
|
local selected_range = function()
|
||||||
local _, s_row, s_col, _ = unpack(vim.fn.getpos('v'))
|
local _, s_row, s_col, _ = unpack(vim.fn.getpos('v'))
|
||||||
local _, e_row, e_col, _ = unpack(vim.fn.getpos('.'))
|
local _, e_row, e_col, _ = unpack(vim.fn.getpos('.'))
|
||||||
|
@ -160,26 +162,15 @@ local config = function()
|
||||||
map('n', '<leader>fo', builtin.vim_options, { desc = ' [F]ind vim [O]ptions' })
|
map('n', '<leader>fo', builtin.vim_options, { desc = ' [F]ind vim [O]ptions' })
|
||||||
map('n', '<leader>fs', builtin.grep_string, { desc = ' [F]ind [S]tring' })
|
map('n', '<leader>fs', builtin.grep_string, { desc = ' [F]ind [S]tring' })
|
||||||
map('v', '<leader>fs', custom.grep_visual, { desc = ' [F]ind visual [S]election' })
|
map('v', '<leader>fs', custom.grep_visual, { desc = ' [F]ind visual [S]election' })
|
||||||
|
map('n', '<leader>br', '<cmd>Telescope file_browser<cr>', { desc = ' file [BR]owser' })
|
||||||
end
|
end
|
||||||
|
|
||||||
local telescope = {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
config = config,
|
|
||||||
}
|
|
||||||
|
|
||||||
local file_browser = {
|
|
||||||
'nvim-telescope/telescope-file-browser.nvim',
|
|
||||||
|
|
||||||
dependencies = { 'nvim-telescope/telescope.nvim' },
|
|
||||||
|
|
||||||
config = function()
|
|
||||||
require('telescope').load_extension 'file_browser'
|
|
||||||
vim.keymap.set('n', '<leader>br', '<cmd>Telescope file_browser<cr>', { desc = ' file [BR]owser' })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
telescope,
|
'nvim-telescope/telescope.nvim',
|
||||||
file_browser,
|
|
||||||
|
config = config,
|
||||||
|
dependencies = {
|
||||||
|
'nvim-telescope/telescope-file-browser.nvim',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,13 +89,13 @@ local config = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
'nvim-treesitter/nvim-treesitter',
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
config = config,
|
|
||||||
},
|
|
||||||
|
|
||||||
'nvim-treesitter/nvim-treesitter-refactor',
|
config = config,
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
dependencies = {
|
||||||
'nvim-treesitter/playground',
|
'nvim-treesitter/nvim-treesitter-refactor',
|
||||||
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
'nvim-treesitter/playground',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue