Enable inlay hints toggle for the supporting servers

This commit is contained in:
Vladislav 2024-04-14 05:28:06 +02:00
parent 23773900d9
commit 4f9de09297
No known key found for this signature in database
GPG Key ID: 07A1CCBD643CA257
1 changed files with 10 additions and 0 deletions

View File

@ -518,6 +518,16 @@ require('lazy').setup({
callback = vim.lsp.buf.clear_references, callback = vim.lsp.buf.clear_references,
}) })
end end
-- The following autocommand is used to enable inlay hints in your
-- code, if the language server you are using supports them
--
-- This may be unwanted, since they displace some of your code
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
map('<leader>th', function()
vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled())
end, '[T]oggle Inlay [H]ints')
end
end, end,
}) })