diff options
Diffstat (limited to 'lua/conform')
-rw-r--r-- | lua/conform/formatters/astgrep.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/conform/formatters/astgrep.lua b/lua/conform/formatters/astgrep.lua new file mode 100644 index 0000000..7e1a1cc --- /dev/null +++ b/lua/conform/formatters/astgrep.lua @@ -0,0 +1,11 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://ast-grep.github.io/", + description = "A CLI tool for code structural search, lint and rewriting. Written in Rust", + }, + command = "ast-grep", + args = { "scan", "--update-all", "$FILENAME" }, + stdin = false, + exit_codes = { 0, 5 }, -- 5 = no config file exists +} |