define lsp code group
This commit is contained in:
parent
6c6003453a
commit
10b75f8e09
8
init.lua
8
init.lua
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue