Compare commits

...

2 Commits

Author SHA1 Message Date
094f7f2e73
refactor(nvim): do not auto toggle inlay hints
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m19s
2024-05-11 10:04:38 -05:00
1579c71beb
Revert 'refactor(nvim): remove nvim-treesitter-context' 2024-05-10 22:38:29 -05:00
2 changed files with 14 additions and 19 deletions

View File

@ -19,23 +19,6 @@ local function on_attach(client, bufnr)
disable_format_capability(capabilities) disable_format_capability(capabilities)
end end
end end
-- Enable inlay hints if the language server provides them
if capabilities.inlayHintProvider then
vim.api.nvim_create_autocmd("InsertEnter", {
buffer = bufnr,
callback = function()
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end,
group = lsp_augroup,
})
vim.api.nvim_create_autocmd("InsertLeave", {
buffer = bufnr,
callback = function()
vim.lsp.inlay_hint.enable(false, { bufnr = bufnr })
end,
group = lsp_augroup,
})
end
if capabilities.semanticTokensProvider and capabilities.semanticTokensProvider.full then if capabilities.semanticTokensProvider and capabilities.semanticTokensProvider.full then
require("hlargs").disable_buf(bufnr) require("hlargs").disable_buf(bufnr)

View File

@ -25,8 +25,20 @@ return {
}, },
}, },
{ {
"PriceHiller/nvim-ts-autotag", "nvim-treesitter/nvim-treesitter-context",
branch = "fix/close-xml-tags", event = { "BufReadPre", "BufNewFile" },
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("treesitter-context").setup({
max_lines = 3,
})
vim.cmd.TSContextEnable()
end,
},
{
"windwp/nvim-ts-autotag",
dependencies = { "nvim-treesitter/nvim-treesitter" }, dependencies = { "nvim-treesitter/nvim-treesitter" },
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
opts = { opts = {