mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Fix angular treesitter not being enabled for angular html template files
This commit is contained in:
parent
9a1162314f
commit
4aff4a8d0a
1 changed files with 12 additions and 0 deletions
|
|
@ -14,6 +14,18 @@ return {
|
||||||
if type(opts.ensure_installed) == "table" then
|
if type(opts.ensure_installed) == "table" then
|
||||||
vim.list_extend(opts.ensure_installed, { "angular", "scss" })
|
vim.list_extend(opts.ensure_installed, { "angular", "scss" })
|
||||||
end
|
end
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = {
|
||||||
|
[".*%.component%.html"] = "angular.html",
|
||||||
|
[".*%.container%.html"] = "angular.html",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "angular.html",
|
||||||
|
callback = function()
|
||||||
|
vim.treesitter.language.register("angular", "angular.html")
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue