fix(angular): re-fix angular html treesitter (#3488)

This was previously attemped to be fixed by
https://github.com/LazyVim/LazyVim/pull/3469, which caused an issue with
angular LSP.
The PR was reverted as mentioned in
https://github.com/LazyVim/LazyVim/pull/3485.

This PR implements suggestion by @folke, which fixes treesitter without
breaking LSP.
This commit is contained in:
Mykhailo Sabatura
2024-06-06 12:31:25 +02:00
committed by GitHub
parent 88db9c5192
commit fd4c38bc2b

View File

@ -14,6 +14,12 @@ return {
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, { "angular", "scss" })
end
vim.api.nvim_create_autocmd("BufRead", {
pattern = { "*.component.html", "*.container.html" },
callback = function()
vim.treesitter.start(nil, "angular")
end,
})
end,
},