nvim: Add mapping for inlay hints
`<localleader>li` will show inlay hints if they are available for the active LSP server.
This commit is contained in:
parent
c03b88c6cc
commit
cb21789f3a
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ local function on_attach(client, bufnr)
|
|||
"<cmd>lua vim.diagnostic.open_float()<cr>",
|
||||
{ buffer = bufnr, desc = "Line diagnostics" }
|
||||
)
|
||||
map("n", "<localleader>li", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||
end, { buffer = bufnr, desc = "Inlay hints" })
|
||||
map("n", "<localleader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = bufnr, desc = "Codeactions" })
|
||||
map("n", "<localleader>ln", "<cmd>lua vim.lsp.buf.rename()<cr>", { buffer = bufnr, desc = "Rename element" })
|
||||
if vim.fn.exists(":Glance") then
|
||||
|
|
Loading…
Reference in a new issue