Skip to content

Commit

Permalink
LSP inlay hints
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <vsoftco@gmail.com>
  • Loading branch information
vsoftco committed May 23, 2024
1 parent 88b0b9c commit d2c73dd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lua/core/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,19 @@ M.nvim_lspconfig = {
end,
{ desc = "LSP format" },
},
["<leader>ih"] = {
-- LSP inlay hints, requires Neovim 0.10 or later
function()
local lsp_inlay_hint = vim.lsp["inlay_hint"]
if lsp_inlay_hint then
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({}))
print("LSP inlay hints:", vim.lsp.inlay_hint.is_enabled({}))
else
print("LSP inlay hints not supported!")
end
end,
{ desc = "LSP inlay hints toggle" },
},
},
[{ "n", "v" }] = {
["<leader>ca"] = { vim.lsp.buf.code_action, { desc = "LSP code actions" } },
Expand Down

0 comments on commit d2c73dd

Please sign in to comment.