nvim: add descriptions to LSP key bindings

This commit is contained in:
Fernando Schauenburg 2025-06-27 18:06:44 +02:00
parent 2f2ac372f4
commit 264a7f1210

View file

@ -9,17 +9,17 @@ end
local lsp_on_attach = function(args)
-- stylua: ignore start
map_local("n", "<leader>sh", toggle_inlay_hints)
map_local("n", "<localleader>c", vim.lsp.buf.code_action)
map_local("n", "<localleader>f", vim.lsp.buf.format)
map_local("n", "gd", vim.lsp.buf.definition)
map_local("n", "gD", vim.lsp.buf.declaration)
map_local("n", "gi", vim.lsp.buf.implementation)
map_local("n", "grr", vim.lsp.buf.rename)
map_local("n", "gt", vim.lsp.buf.type_definition)
map_local("n", "gs", vim.lsp.buf.signature_help)
map_local("i", "<c-s>", vim.lsp.buf.signature_help)
map_local("n", "K", vim.lsp.buf.hover)
map_local("n", "<leader>sh", toggle_inlay_hints, { desc = "LSP: toggle inlay hints" } )
map_local("n", "<localleader>c", vim.lsp.buf.code_action, { desc = "LSP: code action" } )
map_local("n", "<localleader>f", vim.lsp.buf.format, { desc = "LSP: format" } )
map_local("n", "gd", vim.lsp.buf.definition, { desc = "LSP: go to definition" } )
map_local("n", "gD", vim.lsp.buf.declaration, { desc = "LSP: go to declaration" } )
map_local("n", "gi", vim.lsp.buf.implementation, { desc = "LSP: go to implementation" } )
map_local("n", "grr", vim.lsp.buf.rename, { desc = "LSP: rename" } )
map_local("n", "gt", vim.lsp.buf.type_definition, { desc = "LSP: go to type definition" } )
map_local("n", "gs", vim.lsp.buf.signature_help, { desc = "LSP: show 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, { desc = "LSP: display hover information" } )
-- stylua: ignore end
-- Opt out of semantic highlighting because it has been causing issues