diff options
author | pseudometa <73286100+chrisgrieser@users.noreply.github.com> | 2023-11-05 15:29:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 06:29:20 -0800 |
commit | fa3cf1c40716492fd0df0c3dedd54c8018f9ea70 (patch) | |
tree | da20782dfa532a57f3d5df22fdf21c9ab2f55f08 /lua/conform/formatters/astgrep.lua | |
parent | 0bbe83830be5a07a1161bb1a23d7280310656177 (diff) |
feat: add `ast-grep` (#177)
Diffstat (limited to 'lua/conform/formatters/astgrep.lua')
-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 +} |