Skip to content

Commit

Permalink
feat: zigfmt (#23)
Browse files Browse the repository at this point in the history
authored by @fluctlight-kayaba
  • Loading branch information
xiaoshihou514 authored Oct 4, 2023
1 parent 12eba27 commit 6a2c143
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- [x] [yapf](https://github.com/google/yapf)
- [x] [ruff](https://github.com/astral-sh/ruff) as `ruff format`
- [x] [ruff_fix](https://github.com/astral-sh/ruff) as `ruff --fix`
- [ ] [zigfmt](https://github.com/ziglang/zig)

## Linters

Expand Down
6 changes: 6 additions & 0 deletions lua/guard-collection/formatter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,10 @@ M.ruff_fix = {
fname = true,
}

M.zigfmt = {
cmd = 'zig',
args = { 'fmt', '--stdin' },
stdin = true,
}

return M

0 comments on commit 6a2c143

Please sign in to comment.