added navbuddy
This commit is contained in:
parent
a0086b4380
commit
4ee5f69566
59
lua/plugins/navbuddy.lua
Normal file
59
lua/plugins/navbuddy.lua
Normal file
@ -0,0 +1,59 @@
|
||||
return {
|
||||
'SmiteshP/nvim-navbuddy',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'SmiteshP/nvim-navic',
|
||||
'MunifTanjim/nui.nvim'
|
||||
},
|
||||
config = function()
|
||||
local actions = require('nvim-navbuddy.actions')
|
||||
local navbuddy = require('nvim-navbuddy')
|
||||
navbuddy.setup {
|
||||
mappings = {
|
||||
['<esc>'] = actions.close, -- Close and cursor to original location
|
||||
['q'] = actions.close,
|
||||
['j'] = actions.next_sibling, -- down
|
||||
['k'] = actions.previous_sibling, -- up
|
||||
['h'] = actions.parent, -- Move to left panel
|
||||
['l'] = actions.children, -- Move to right panel
|
||||
['v'] = actions.visual_name, -- Visual selection of name
|
||||
['V'] = actions.visual_scope, -- Visual selection of scope
|
||||
['y'] = actions.yank_name, -- Yank the name to system clipboard "+
|
||||
['Y'] = actions.yank_scope, -- Yank the scope to system clipboard "+
|
||||
['i'] = actions.insert_name, -- Insert at start of name
|
||||
['I'] = actions.insert_scope, -- Insert at start of scope
|
||||
['a'] = actions.append_name, -- Insert at end of name
|
||||
['A'] = actions.append_scope, -- Insert at end of scope
|
||||
['r'] = actions.rename, -- Rename currently focused symbol
|
||||
['d'] = actions.delete, -- Delete scope
|
||||
['f'] = actions.fold_create, -- Create fold of current scope
|
||||
['F'] = actions.fold_delete, -- Delete fold of current scope
|
||||
['c'] = actions.comment, -- Comment out current scope
|
||||
['<enter>'] = actions.select, -- Goto selected symbol
|
||||
['o'] = actions.select,
|
||||
['J'] = actions.move_down, -- Move focused node down
|
||||
['K'] = actions.move_up, -- Move focused node up
|
||||
['<down>'] = actions.next_sibling, -- down
|
||||
['<uo>'] = actions.previous_sibling, -- up
|
||||
['<left>'] = actions.parent, -- Move to left panel
|
||||
['<right>'] = actions.children, -- Move to right panel
|
||||
['<S-down>'] = actions.move_down, -- Move focused node down
|
||||
['<S-up>'] = actions.move_up, -- Move focused node up
|
||||
},
|
||||
lsp = {
|
||||
auto_attach = true, -- If set to true, you don't need to manually use attach function
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
'<Space>n',
|
||||
function()
|
||||
require('nvim-navbuddy').open()
|
||||
end,
|
||||
desc = 'Navbuddy'
|
||||
},
|
||||
},
|
||||
cmd = 'Navbuddy',
|
||||
event = 'LspAttach'
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user