diff options
author | Hoang Nguyen <folliekazetani@protonmail.com> | 2024-01-05 17:57:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 09:57:59 -0800 |
commit | 03de11a0dcf686fda58d64a895483e284dd0c5b6 (patch) | |
tree | f6e5999c75a38d44b9489d0e592e96c4403a6417 | |
parent | 08024063232a7bd38ecdfaf89f06162a5ba2df91 (diff) |
feat: add cue_fmt formatter (#265)
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 1 | ||||
-rw-r--r-- | lua/conform/formatters/cue_fmt.lua | 10 |
3 files changed, 12 insertions, 0 deletions
@@ -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. diff --git a/doc/conform.txt b/doc/conform.txt index 6bf52ef..c9b929f 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -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. diff --git a/lua/conform/formatters/cue_fmt.lua b/lua/conform/formatters/cue_fmt.lua new file mode 100644 index 0000000..e9787d6 --- /dev/null +++ b/lua/conform/formatters/cue_fmt.lua @@ -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, +} |