From 6d6b3f38c1e243e2fd8f96b6b6eff1720c110cab Mon Sep 17 00:00:00 2001 From: Chris Patti Date: Wed, 17 Apr 2024 14:02:24 -0400 Subject: [PATCH 1/2] Fix: #847 - add prefer_git to treesitter config (#856) --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 1d922df..cc49351 100644 --- a/init.lua +++ b/init.lua @@ -817,6 +817,8 @@ require('lazy').setup({ 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) From 5540527fabc2776cf62b63ef511079b1c8bf5297 Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:04:55 +0200 Subject: [PATCH 2/2] Enable inlay hints for the supporting servers (#843) --- init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.lua b/init.lua index cc49351..4bd9b7f 100644 --- a/init.lua +++ b/init.lua @@ -286,6 +286,7 @@ require('lazy').setup({ ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, + ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, } end, }, @@ -518,6 +519,16 @@ require('lazy').setup({ 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('th', function() + vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled()) + end, '[T]oggle Inlay [H]ints') + end end, })