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
|
||||
|
||||
return {
|
||||
{ 'hrsh7th/nvim-cmp', config = config },
|
||||
'hrsh7th/nvim-cmp',
|
||||
|
||||
config = config,
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'onsails/lspkind-nvim',
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -67,9 +67,12 @@ local config = function()
|
|||
end
|
||||
|
||||
return {
|
||||
{ 'neovim/nvim-lspconfig', config = config },
|
||||
'neovim/nvim-lspconfig',
|
||||
|
||||
config = config,
|
||||
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 _, s_row, s_col, _ = unpack(vim.fn.getpos('v'))
|
||||
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>fs', builtin.grep_string, { desc = ' [F]ind [S]tring' })
|
||||
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
|
||||
|
||||
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 {
|
||||
telescope,
|
||||
file_browser,
|
||||
'nvim-telescope/telescope.nvim',
|
||||
|
||||
config = config,
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope-file-browser.nvim',
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -89,13 +89,13 @@ local config = function()
|
|||
end
|
||||
|
||||
return {
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
config = config,
|
||||
},
|
||||
|
||||
config = config,
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-refactor',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
'nvim-treesitter/playground',
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue