aboutsummaryrefslogtreecommitdiff
path: root/lua/kickstart/plugins/lspconfig.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/kickstart/plugins/lspconfig.lua')
-rw-r--r--lua/kickstart/plugins/lspconfig.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua
index 8da925b..4e13939 100644
--- a/lua/kickstart/plugins/lspconfig.lua
+++ b/lua/kickstart/plugins/lspconfig.lua
@@ -115,6 +115,16 @@ return {
callback = vim.lsp.buf.clear_references,
})
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,
})