diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 1 | ||||
-rw-r--r-- | lua/conform/formatters/crystal.lua | 10 |
3 files changed, 12 insertions, 0 deletions
@@ -201,6 +201,7 @@ You can view this list in vim with `:help conform-formatters` - [cljstyle](https://github.com/greglook/cljstyle) - Formatter for Clojure code. - [cmake_format](https://github.com/cheshirekow/cmake_format) - Parse cmake listfiles and format them nicely. - [codespell](https://github.com/codespell-project/codespell) - Check code for common misspellings. +- [crystal](https://crystal-lang.org/) - Format Crystal code. - [csharpier](https://github.com/belav/csharpier) - The opinionated C# code formatter. - [cue_fmt](https://cuelang.org) - Format CUE files using `cue fmt` command. - [darker](https://github.com/akaihola/darker) - Run black only on changed lines. diff --git a/doc/conform.txt b/doc/conform.txt index d0ffda2..fb3ff77 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -208,6 +208,7 @@ FORMATTERS *conform-formatter `cljstyle` - Formatter for Clojure code. `cmake_format` - Parse cmake listfiles and format them nicely. `codespell` - Check code for common misspellings. +`crystal`- Format Crystal code. `csharpier` - The opinionated C# code formatter. `cue_fmt` - Format CUE files using `cue fmt` command. `darker` - Run black only on changed lines. diff --git a/lua/conform/formatters/crystal.lua b/lua/conform/formatters/crystal.lua new file mode 100644 index 0000000..1f9e12b --- /dev/null +++ b/lua/conform/formatters/crystal.lua @@ -0,0 +1,10 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://crystal-lang.org/", + description = "Format Crystal code.", + }, + command = "crystal", + args = { "tool", "format", "-" }, + stdin = true, +} |