Skip to content

Commit

Permalink
feat: add ast-grep (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser authored Nov 5, 2023
1 parent 0bbe838 commit fa3cf1c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/conform/formatters/astgrep.lua
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit fa3cf1c

Please sign in to comment.