From 5bfccbcebec042512a44fc1371927472254fa148 Mon Sep 17 00:00:00 2001 From: 231tr0n Date: Wed, 11 Dec 2024 02:40:56 +0530 Subject: [PATCH] feat: add goimports formatter (#52) --- README.md | 1 + lua/guard-collection/formatter.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 831284e..a7a3eb0 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ - [ ] [fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) - [x] [gofmt](https://pkg.go.dev/cmd/gofmt) - [x] [gofumpt](https://pkg.go.dev/mvdan.cc/gofumpt) +- [ ] [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports) - [x] [golines](https://pkg.go.dev/github.com/segmentio/golines) - [ ] [google-java-format](https://github.com/google/google-java-format) - [ ] [isort](https://github.com/PyCQA/isort) diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index c7a7874..6c3e545 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -322,4 +322,9 @@ M.jq = { stdin = true, } +M.goimports = { + cmd = 'goimports', + stdin = true, +} + return M