feat(formatting): format xhtml with html-tidy
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
formatters = with pkgs; [
|
formatters = with pkgs; [
|
||||||
alejandra
|
alejandra
|
||||||
jq
|
jq
|
||||||
|
html-tidy
|
||||||
libxml2
|
libxml2
|
||||||
mdfmt
|
mdfmt
|
||||||
prettierd
|
prettierd
|
||||||
|
|||||||
Reference in New Issue
Block a user