feat(hipatterns): added vue/astro

This commit is contained in:
Folke Lemaitre 2024-06-03 09:24:19 +02:00
parent 1731e455d4
commit d6c59d9a41
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -14,17 +14,19 @@ M.plugin = {
-- custom LazyVim option to enable the tailwind integration -- custom LazyVim option to enable the tailwind integration
tailwind = { tailwind = {
enabled = true, enabled = true,
ft = { ft = {
"typescriptreact", "astro",
"javascriptreact",
"css", "css",
"javascript", "heex",
"typescript",
"html", "html",
"svelte",
"rust",
"html-eex", "html-eex",
"heex", "javascript",
"javascriptreact",
"rust",
"svelte",
"typescript",
"typescriptreact",
"vue",
}, },
-- full: the whole css class will be highlighted -- full: the whole css class will be highlighted
-- compact: only the color will be highlighted -- compact: only the color will be highlighted
@ -48,25 +50,6 @@ M.plugin = {
} }
end, end,
config = function(_, opts) config = function(_, opts)
-- backward compatibility
if opts.tailwind == true then
opts.tailwind = {
enabled = true,
ft = {
"typescriptreact",
"javascriptreact",
"css",
"javascript",
"typescript",
"html",
"svelte",
"rust",
"html-eex",
"heex",
},
style = "full",
}
end
if type(opts.tailwind) == "table" and opts.tailwind.enabled then if type(opts.tailwind) == "table" and opts.tailwind.enabled then
-- reset hl groups when colorscheme changes -- reset hl groups when colorscheme changes
vim.api.nvim_create_autocmd("ColorScheme", { vim.api.nvim_create_autocmd("ColorScheme", {