aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/cbfmt.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lua/conform/formatters/cbfmt.lua b/lua/conform/formatters/cbfmt.lua
new file mode 100644
index 0000000..57c48e4
--- /dev/null
+++ b/lua/conform/formatters/cbfmt.lua
@@ -0,0 +1,15 @@
+local util = require("conform.util")
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/lukas-reineke/cbfmt",
+ description = "A tool to format codeblocks inside markdown and org documents.",
+ },
+ command = "cbfmt",
+ args = { "--write", "--best-effort", "$FILENAME" },
+ cwd = util.root_file({
+ -- https://github.com/lukas-reineke/cbfmt#config
+ ".cbfmt.toml",
+ }),
+ stdin = false,
+}