aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/cue_fmt.lua10
3 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index b95cb30..c896991 100644
--- a/README.md
+++ b/README.md
@@ -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,
+}