Skip to content

Commit

Permalink
feat: add support for kdlfmt
Browse files Browse the repository at this point in the history
Closes #509
  • Loading branch information
hougesen committed Oct 11, 2024
1 parent 40d4e98 commit b917556
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions lua/conform/formatters/kdlfmt.lua
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit b917556

Please sign in to comment.