Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support crystal tool format #344

Merged
merged 1 commit into from Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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,
}