Enable inlay hints toggle for the supporting servers
This commit is contained in:
parent
23773900d9
commit
4f9de09297
10
init.lua
10
init.lua
|
@ -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,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue