Skip to content

Commit

Permalink
feat(html-css): add full PostCSS support
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Oct 17, 2024
1 parent 8a35bc6 commit 7c489c2
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion lua/astrocommunity/pack/html-css/init.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
return {
{ import = "astrocommunity.pack.json" },
{
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = { filetypes = { extension = {
pcss = "postcss",
postcss = "postcss",
} } },
},
{
"nvim-treesitter/nvim-treesitter",
optional = true,
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "css" })
opts.ensure_installed =
require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "css", "scss" })
end
vim.treesitter.language.register("scss", "less")
vim.treesitter.language.register("scss", "postcss")
end,
},
{
Expand Down Expand Up @@ -52,6 +63,16 @@ return {
css = { "prettierd", "prettier", stop_after_first = true },
scss = { "prettierd", "prettier", stop_after_first = true },
less = { "prettierd", "prettier", stop_after_first = true },
postcss = { "prettierd", "prettier", stop_after_first = true },
},
},
},
{
"echasnovski/mini.icons",
optional = true,
opts = {
filetype = {
postcss = { glyph = "󰌜", hl = "MiniIconsOrange" },
},
},
},
Expand Down

0 comments on commit 7c489c2

Please sign in to comment.