Skip to content

Commit

Permalink
feat: support crystal tool format (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Mar 18, 2024
1 parent 220988e commit f8c64b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions 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,
}

0 comments on commit f8c64b8

Please sign in to comment.