From e97523992fc6ba13f926dcf15d7f2293185c6c32 Mon Sep 17 00:00:00 2001 From: xiaoshihou Date: Wed, 4 Oct 2023 21:29:21 +0100 Subject: [PATCH] feat: zigfmt authored by @fluctlight-kayaba --- README.md | 1 + lua/guard-collection/formatter.lua | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 54860f0..c3bd1e8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index 42f5c5e..afd32b5 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -196,4 +196,10 @@ M.ruff_fix = { fname = true, } +M.zigfmt = { + cmd = 'zig', + args = { 'fmt', '--stdin' }, + stdin = true, +} + return M