aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/kickstart/plugins/lspconfig.lua10
-rw-r--r--lua/kickstart/plugins/treesitter.lua2
-rw-r--r--lua/kickstart/plugins/which-key.lua1
3 files changed, 13 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,
})
diff --git a/lua/kickstart/plugins/treesitter.lua b/lua/kickstart/plugins/treesitter.lua
index da7db63..4bf12fe 100644
--- a/lua/kickstart/plugins/treesitter.lua
+++ b/lua/kickstart/plugins/treesitter.lua
@@ -18,6 +18,8 @@ return {
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
+ -- Prefer git instead of curl in order to improve connectivity in some environments
+ require('nvim-treesitter.install').prefer_git = true
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts)
diff --git a/lua/kickstart/plugins/which-key.lua b/lua/kickstart/plugins/which-key.lua
index d66449e..d37883b 100644
--- a/lua/kickstart/plugins/which-key.lua
+++ b/lua/kickstart/plugins/which-key.lua
@@ -27,6 +27,7 @@ return {
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
+ ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
}
end,
},