feat: map lsp commands
This commit is contained in:
parent
9ce3404d79
commit
ec4a2c0af9
1 changed files with 8 additions and 0 deletions
|
@ -60,6 +60,14 @@ local function custom_on_attach(client, buffer_nr)
|
||||||
|
|
||||||
-- Inspect function
|
-- Inspect function
|
||||||
bufnnoremap("K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
|
bufnnoremap("K", "<Cmd>lua vim.lsp.buf.hover()<CR>")
|
||||||
|
bufnnoremap("<C-k>", "<Cmd>lua vim.lsp.buf.signature_help()<CR>")
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
bufnnoremap("gd", "<Cmd>lua vim.lsp.buf.definition()<CR>")
|
||||||
|
bufnnoremap("gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>")
|
||||||
|
bufnnoremap("gi", "<Cmd>lua vim.lsp.buf.implementation()<CR>")
|
||||||
|
bufnnoremap("gr", "<Cmd>lua vim.lsp.buf.references()<CR>")
|
||||||
|
bufnnoremap("ga", "<Cmd>lua vim.lsp.buf.code_action()<CR>")
|
||||||
|
|
||||||
-- Rename all references of symbol
|
-- Rename all references of symbol
|
||||||
bufnnoremap("<leader>R", "<Cmd>lua vim.lsp.buf.rename()<CR>")
|
bufnnoremap("<leader>R", "<Cmd>lua vim.lsp.buf.rename()<CR>")
|
||||||
|
|
Loading…
Reference in a new issue