From 7ea4d241f8cc3c93a20a1604ee4d60edd0df0a2a Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Mon, 19 Aug 2024 13:00:18 -0400 Subject: [PATCH] fix(go): enable `gofumpt` in `gopls` by default --- lua/astrocommunity/pack/go/README.md | 1 + lua/astrocommunity/pack/go/init.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/astrocommunity/pack/go/README.md b/lua/astrocommunity/pack/go/README.md index 79f5fea3a..9e8b00bcd 100644 --- a/lua/astrocommunity/pack/go/README.md +++ b/lua/astrocommunity/pack/go/README.md @@ -6,6 +6,7 @@ This plugin pack does the following: - Adds `go` Treesitter parsers - Adds `gopls` language server + - By default it is configured to use [`gofumpt`](https://github.com/mvdan/gofumpt) for formatting - Adds the following go packages: - [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports?utm_source=godoc) - [gomodifytags](https://github.com/fatih/gomodifytags) diff --git a/lua/astrocommunity/pack/go/init.lua b/lua/astrocommunity/pack/go/init.lua index 1d051ee0e..b0578f1bd 100644 --- a/lua/astrocommunity/pack/go/init.lua +++ b/lua/astrocommunity/pack/go/init.lua @@ -43,6 +43,7 @@ return { buildFlags = { "-tags", "integration" }, completeUnimported = true, diagnosticsDelay = "500ms", + gofumpt = true, matcher = "Fuzzy", semanticTokens = true, staticcheck = true,