aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkarei <31644842+kareigu@users.noreply.github.com>2024-02-21 22:14:17 +0200
committerGitHub <noreply@github.com>2024-02-21 12:14:17 -0800
commit79d7fd9ee84e603bdb66038b1d1ed2703ec08d14 (patch)
tree0a7fd4d5177b7617aa8671f094e35d098ba3f7a4
parentb8624e46d83c8b59e5d4a773bdcae6ffc3b9639a (diff)
feat: add `gersemi` formatter (#305)
* Add `formatters/gersemi.lua` * Add `gersemi` to README.md
-rw-r--r--README.md1
-rw-r--r--lua/conform/formatters/gersemi.lua11
2 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index f0418d0..af0b2e5 100644
--- a/README.md
+++ b/README.md
@@ -219,6 +219,7 @@ You can view this list in vim with `:help conform-formatters`
- [fourmolu](https://hackage.haskell.org/package/fourmolu) - Fourmolu is a formatter for Haskell source code.
- [gci](https://github.com/daixiang0/gci) - GCI, a tool that controls Go package import order and makes it always deterministic.
- [gdformat](https://github.com/Scony/godot-gdscript-toolkit) - A formatter for Godot's gdscript.
+- [gersemi](https://github.com/BlankSpruce/gersemi) - A formatter to make your CMake code the real treasure.
- [gn](https://gn.googlesource.com/gn/) - gn build system.
- [gofmt](https://pkg.go.dev/cmd/gofmt) - Formats go programs.
- [gofumpt](https://github.com/mvdan/gofumpt) - Enforce a stricter format than gofmt, while being backwards compatible. That is, gofumpt is happy with a subset of the formats that gofmt is happy with.
diff --git a/lua/conform/formatters/gersemi.lua b/lua/conform/formatters/gersemi.lua
new file mode 100644
index 0000000..4c97717
--- /dev/null
+++ b/lua/conform/formatters/gersemi.lua
@@ -0,0 +1,11 @@
+local util = require("conform.util")
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/BlankSpruce/gersemi",
+ description = "A formatter to make your CMake code the real treasure.",
+ },
+ command = "gersemi",
+ args = { "--quiet", "-" },
+ cwd = util.root_file({ ".gersemirc" }),
+}