nvim: add descriptions to LSP key bindings
This commit is contained in:
parent
2f2ac372f4
commit
264a7f1210
1 changed files with 11 additions and 11 deletions
|
@ -9,17 +9,17 @@ end
|
||||||
|
|
||||||
local lsp_on_attach = function(args)
|
local lsp_on_attach = function(args)
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
map_local("n", "<leader>sh", toggle_inlay_hints)
|
map_local("n", "<leader>sh", toggle_inlay_hints, { desc = "LSP: toggle inlay hints" } )
|
||||||
map_local("n", "<localleader>c", vim.lsp.buf.code_action)
|
map_local("n", "<localleader>c", vim.lsp.buf.code_action, { desc = "LSP: code action" } )
|
||||||
map_local("n", "<localleader>f", vim.lsp.buf.format)
|
map_local("n", "<localleader>f", vim.lsp.buf.format, { desc = "LSP: format" } )
|
||||||
map_local("n", "gd", vim.lsp.buf.definition)
|
map_local("n", "gd", vim.lsp.buf.definition, { desc = "LSP: go to definition" } )
|
||||||
map_local("n", "gD", vim.lsp.buf.declaration)
|
map_local("n", "gD", vim.lsp.buf.declaration, { desc = "LSP: go to declaration" } )
|
||||||
map_local("n", "gi", vim.lsp.buf.implementation)
|
map_local("n", "gi", vim.lsp.buf.implementation, { desc = "LSP: go to implementation" } )
|
||||||
map_local("n", "grr", vim.lsp.buf.rename)
|
map_local("n", "grr", vim.lsp.buf.rename, { desc = "LSP: rename" } )
|
||||||
map_local("n", "gt", vim.lsp.buf.type_definition)
|
map_local("n", "gt", vim.lsp.buf.type_definition, { desc = "LSP: go to type definition" } )
|
||||||
map_local("n", "gs", vim.lsp.buf.signature_help)
|
map_local("n", "gs", vim.lsp.buf.signature_help, { desc = "LSP: show signature help" } )
|
||||||
map_local("i", "<c-s>", vim.lsp.buf.signature_help)
|
map_local("i", "<c-s>", vim.lsp.buf.signature_help, { desc = "LSP: show signature help" } )
|
||||||
map_local("n", "K", vim.lsp.buf.hover)
|
map_local("n", "K", vim.lsp.buf.hover, { desc = "LSP: display hover information" } )
|
||||||
-- stylua: ignore end
|
-- stylua: ignore end
|
||||||
|
|
||||||
-- Opt out of semantic highlighting because it has been causing issues
|
-- Opt out of semantic highlighting because it has been causing issues
|
||||||
|
|
Loading…
Add table
Reference in a new issue