From e3a337ebd438e3ee3bdb27a9864064f87b301044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ellis=20Keny=C5=91?= Date: Thu, 17 Nov 2022 17:40:27 +0000 Subject: [PATCH] fix!(go): prefer upstream formatter config BREAKING CHANGE: Since apheleia doesn't handle regions yet, this should be fine to leave to upstream. This could be considered a breaking change if users rely on this functionality. --- modules/lang/go/config.el | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 525444a81..dc66af7b2 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -11,14 +11,6 @@ :references #'go-guru-referrers :documentation #'godoc-at-point) - ;; Redefines default formatter to *not* use goimports if reformatting a - ;; region; as it doesn't play well with partial code. - (set-formatter! 'gofmt - '(("%s" (if (or +format-region-p - (not (executable-find "goimports"))) - "gofmt" - "goimports")))) - (if (modulep! +lsp) (add-hook 'go-mode-local-vars-hook #'lsp! 'append) (add-hook 'go-mode-hook #'go-eldoc-setup))