diff --git a/README.md b/README.md index cb3aea4..a33afdd 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ You can view this list in vim with `:help conform-formatters` - [jsonnetfmt](https://github.com/google/go-jsonnet/tree/master/cmd/jsonnetfmt) - jsonnetfmt is a command line tool to format jsonnet files. - [just](https://github.com/casey/just) - Format Justfile. - [kcl](https://www.kcl-lang.io/docs/tools/cli/kcl/fmt) - The KCL Format tool modifies the files according to the KCL code style. +- [kdlfmt](https://github.com/hougesen/kdlfmt) - A formatter for kdl documents. - [ktfmt](https://github.com/facebook/ktfmt) - Reformats Kotlin source code to comply with the common community standard conventions. - [ktlint](https://ktlint.github.io/) - An anti-bikeshedding Kotlin linter with built-in formatter. - [kulala-fmt](https://github.com/mistweaverco/kulala-fmt) - An opinionated .http and .rest files linter and formatter. diff --git a/doc/conform.txt b/doc/conform.txt index 7a300af..0932b9e 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -369,6 +369,7 @@ FORMATTERS *conform-formatter `jsonnetfmt` - jsonnetfmt is a command line tool to format jsonnet files. `just` - Format Justfile. `kcl` - The KCL Format tool modifies the files according to the KCL code style. +`kdlfmt` - A formatter for kdl documents. `ktfmt` - Reformats Kotlin source code to comply with the common community standard conventions. `ktlint` - An anti-bikeshedding Kotlin linter with built-in formatter. diff --git a/lua/conform/formatters/kdlfmt.lua b/lua/conform/formatters/kdlfmt.lua new file mode 100644 index 0000000..f1f61ba --- /dev/null +++ b/lua/conform/formatters/kdlfmt.lua @@ -0,0 +1,10 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/hougesen/kdlfmt", + description = "A formatter for kdl documents.", + }, + command = "kdlfmt", + args = { "format", "-" }, + stdin = true, +}