Skip to content

Commit 7c489c2

Browse files
committed
feat(html-css): add full PostCSS support
1 parent 8a35bc6 commit 7c489c2

File tree

1 file changed

+22
-1
lines changed
  • lua/astrocommunity/pack/html-css

1 file changed

+22
-1
lines changed

lua/astrocommunity/pack/html-css/init.lua

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
return {
22
{ import = "astrocommunity.pack.json" },
3+
{
4+
"AstroNvim/astrocore",
5+
---@type AstroCoreOpts
6+
opts = { filetypes = { extension = {
7+
pcss = "postcss",
8+
postcss = "postcss",
9+
} } },
10+
},
311
{
412
"nvim-treesitter/nvim-treesitter",
513
optional = true,
614
opts = function(_, opts)
715
if opts.ensure_installed ~= "all" then
8-
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "css" })
16+
opts.ensure_installed =
17+
require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "css", "scss" })
918
end
19+
vim.treesitter.language.register("scss", "less")
20+
vim.treesitter.language.register("scss", "postcss")
1021
end,
1122
},
1223
{
@@ -52,6 +63,16 @@ return {
5263
css = { "prettierd", "prettier", stop_after_first = true },
5364
scss = { "prettierd", "prettier", stop_after_first = true },
5465
less = { "prettierd", "prettier", stop_after_first = true },
66+
postcss = { "prettierd", "prettier", stop_after_first = true },
67+
},
68+
},
69+
},
70+
{
71+
"echasnovski/mini.icons",
72+
optional = true,
73+
opts = {
74+
filetype = {
75+
postcss = { glyph = "󰌜", hl = "MiniIconsOrange" },
5576
},
5677
},
5778
},

0 commit comments

Comments
 (0)