aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/ast-grep.lua
diff options
context:
space:
mode:
authorpseudometa <73286100+chrisgrieser@users.noreply.github.com>2023-11-05 17:09:35 +0100
committerGitHub <noreply@github.com>2023-11-05 08:09:35 -0800
commitbfa69a942e19159d3a3e958a5be85cb7cdae19a7 (patch)
tree63cafdb4b30d9d350c6759160fd76fc4abbcc340 /lua/conform/formatters/ast-grep.lua
parent5344d0ac8e178d77a911c880890fc6114e02a513 (diff)
fix: rename `astgrep` to `ast-grep` (#178)
Diffstat (limited to 'lua/conform/formatters/ast-grep.lua')
-rw-r--r--lua/conform/formatters/ast-grep.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/conform/formatters/ast-grep.lua b/lua/conform/formatters/ast-grep.lua
new file mode 100644
index 0000000..7e1a1cc
--- /dev/null
+++ b/lua/conform/formatters/ast-grep.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
+}