feat(formatting): format xhtml with html-tidy

This commit is contained in:
Guz
2025-08-11 19:12:02 -03:00
parent 6c46530516
commit 899d69358c
2 changed files with 9 additions and 2 deletions

View File

@@ -34,8 +34,8 @@ return {
nix = { "alejandra" }, nix = { "alejandra" },
rust = { "rustfmt", lsp_format = "fallback" }, rust = { "rustfmt", lsp_format = "fallback" },
sh = { "shellharden", "shfmt" }, sh = { "shellharden", "shfmt" },
xml = { "xmllint" }, xml = { "xmllint", "xmltidy" },
xhtml = { "xmllint" }, xhtml = { "xmllint", "xmltidy" },
markdown = { "mdfmt" }, markdown = { "mdfmt" },
html = { "prettierd", "prettier", stop_after_first = true }, html = { "prettierd", "prettier", stop_after_first = true },
@@ -87,6 +87,12 @@ return {
mdfmt = { mdfmt = {
command = "mdfmt", command = "mdfmt",
}, },
-- Uses HTML Tidy
xmltidy = {
inherit = false,
command = "tidy",
args = { "-xml", "-indent", "yes", "2", "-wrap", "100", "-" },
},
}, },
}) })
end, end,

View File

@@ -104,6 +104,7 @@
formatters = with pkgs; [ formatters = with pkgs; [
alejandra alejandra
jq jq
html-tidy
libxml2 libxml2
mdfmt mdfmt
prettierd prettierd