diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 2 | ||||
-rw-r--r-- | lua/conform/formatters/xmllint.lua | 9 |
3 files changed, 12 insertions, 0 deletions
@@ -286,6 +286,7 @@ You can view this list in vim with `:help conform-formatters` - [uncrustify](https://github.com/uncrustify/uncrustify) - A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and Vala. - [usort](https://github.com/facebook/usort) - Safe, minimal import sorting for Python projects. - [xmlformat](https://github.com/pamoller/xmlformatter) - xmlformatter is an Open Source Python package, which provides formatting of XML documents. +- [xmllint](http://xmlsoft.org/xmllint.html) - Despite the name, xmllint can be used to format XML files as well as lint them, and that's the mode this formatter is using. - [yamlfix](https://github.com/lyz-code/yamlfix) - A configurable YAML formatter that keeps comments. - [yamlfmt](https://github.com/google/yamlfmt) - yamlfmt is an extensible command line tool or library to format yaml files. - [yapf](https://github.com/google/yapf) - Yet Another Python Formatter. diff --git a/doc/conform.txt b/doc/conform.txt index f5e853d..6b963d8 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -326,6 +326,8 @@ FORMATTERS *conform-formatter `usort` - Safe, minimal import sorting for Python projects. `xmlformat` - xmlformatter is an Open Source Python package, which provides formatting of XML documents. +`xmllint` - Despite the name, xmllint can be used to format XML files as well as + lint them, and that's the mode this formatter is using. `yamlfix` - A configurable YAML formatter that keeps comments. `yamlfmt` - yamlfmt is an extensible command line tool or library to format yaml files. diff --git a/lua/conform/formatters/xmllint.lua b/lua/conform/formatters/xmllint.lua new file mode 100644 index 0000000..3e06400 --- /dev/null +++ b/lua/conform/formatters/xmllint.lua @@ -0,0 +1,9 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "http://xmlsoft.org/xmllint.html", + description = "Despite the name, xmllint can be used to format XML files as well as lint them.", + }, + command = "xmllint", + args = { "--format", "-" }, +} |