define lsp code group

This commit is contained in:
Nick Burt 2026-07-01 15:17:50 -05:00
parent 6c6003453a
commit 10b75f8e09
1 changed files with 5 additions and 3 deletions

View File

@ -379,7 +379,9 @@ do
{ 'gr', group = 'LSP Actions', mode = { 'n' } },
{ '<leader>g', group = '[G]it' },
{ '<leader>n', group = '[N]otepad' },
{ '<leader>r', group = '[R]e[N]ame' },
{ '<leader>r', group = '[R]e[N]ame', mode = { 'n' } },
{ '<leader>c', group = 'LSP: [C]ode', mode = { 'n' } },
{ '<leader>cg', group = 'LSP: [G]oto', mode = { 'n' } },
},
}
@ -655,11 +657,11 @@ do
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
map('<leader>cgD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.