Skip to content

Commit

Permalink
feat: add cue_fmt formatter (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
folliehiyuki committed Jan 5, 2024
1 parent 0802406 commit 03de11a
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 @@ -199,6 +199,7 @@ You can view this list in vim with `:help conform-formatters`
- [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.
- [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.
- [dart_format](https://dart.dev/tools/dart-format) - Replace the whitespace in your program with formatting that follows Dart guidelines.
- [deno_fmt](https://deno.land/manual/tools/formatter) - Use [Deno](https://deno.land/) to format TypeScript, JavaScript/JSON and markdown.
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ FORMATTERS *conform-formatter
`cmake_format` - Parse cmake listfiles and format them nicely.
`codespell` - Check code for common misspellings.
`csharpier` - The opinionated C# code formatter.
`cue_fmt` - Format CUE files using `cue fmt` command.
`darker` - Run black only on changed lines.
`dart_format` - Replace the whitespace in your program with formatting that
follows Dart guidelines.
Expand Down
10 changes: 10 additions & 0 deletions lua/conform/formatters/cue_fmt.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://cuelang.org",
description = "Format CUE files using `cue fmt` command.",
},
command = "cue",
args = { "fmt", "-" },
stdin = true,
}

0 comments on commit 03de11a

Please sign in to comment.