From aa36bc05563d5390a2ef67956d72560048acdc2e Mon Sep 17 00:00:00 2001 From: Govind Singh Rajpurohit Date: Wed, 15 Nov 2023 07:02:46 +0000 Subject: feat: add cbfmt (#198) * feat: add cbfmt * lint: fix style --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com> --- lua/conform/formatters/cbfmt.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lua/conform/formatters/cbfmt.lua (limited to 'lua/conform/formatters/cbfmt.lua') 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, +} -- cgit v1.2.3-70-g09d2