mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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.
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user