chore: decouple navbuddy from lsp
This commit is contained in:
parent
e2926f4c54
commit
faf3b36275
|
@ -37,10 +37,6 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
|||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)
|
||||
|
||||
-- Plugins
|
||||
vim.keymap.set('n', '<leader>nb', ':Navbuddy<CR>', { desc = '[N]av[b]uddy' })
|
||||
vim.keymap.set('n', '<leader>nt', ':NvimTreeToggle<CR>', { desc = '[N]vim[T]ree' })
|
||||
|
||||
-- terminal keymaps
|
||||
function _G.set_terminal_keymaps()
|
||||
local opts = { buffer = 0 }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local on_attach = function(client, bufnr)
|
||||
local on_attach = function(_, bufnr)
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = 'LSP: ' .. desc
|
||||
|
@ -10,8 +10,6 @@ local on_attach = function(client, bufnr)
|
|||
vim.lsp.buf.format { timeout_ms = 2000 }
|
||||
end
|
||||
|
||||
require('nvim-navbuddy').attach(client, bufnr)
|
||||
|
||||
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
nmap('<leader>ff', delayed_format, '[F]ormat')
|
||||
|
@ -50,15 +48,6 @@ return {
|
|||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
|
||||
{
|
||||
'SmiteshP/nvim-navbuddy',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'SmiteshP/nvim-navic',
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
},
|
||||
|
||||
-- adds extra functionality over rust_analyzer
|
||||
'simrat39/rust-tools.nvim',
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
'SmiteshP/nvim-navbuddy',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'SmiteshP/nvim-navic',
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-navbuddy').setup { lsp = { auto_attach = true } }
|
||||
|
||||
-- Plugins
|
||||
vim.keymap.set('n', '<leader>nb', ':Navbuddy<CR>', { desc = '[N]av[b]uddy' })
|
||||
vim.keymap.set('n', '<leader>nt', ':NvimTreeToggle<CR>', { desc = '[N]vim[T]ree' })
|
||||
end,
|
||||
}
|
Loading…
Reference in New Issue