Skip to content

Commit a8671a1

Browse files
chrisgrieserF1lipB
authored andcommitted
feat: add ast-grep (nvim-lua#177)
1 parent 230d560 commit a8671a1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lua/conform/formatters/astgrep.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---@type conform.FileFormatterConfig
2+
return {
3+
meta = {
4+
url = "https://ast-grep.github.io/",
5+
description = "A CLI tool for code structural search, lint and rewriting. Written in Rust",
6+
},
7+
command = "ast-grep",
8+
args = { "scan", "--update-all", "$FILENAME" },
9+
stdin = false,
10+
exit_codes = { 0, 5 }, -- 5 = no config file exists
11+
}

0 commit comments

Comments
 (0)