lang/go: fix formatter
`use-region-p` is not a reliable mechanism for detecting region-type formatting, so +format-type was added to the editor/format module.
This commit is contained in:
parent
c52d2a5a14
commit
08d9c02218
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@
|
|||
;; 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 (use-region-p)
|
||||
'(("%s" (if (or (eq +format-type 'region)
|
||||
(not (executable-find "goimports")))
|
||||
"gofmt"
|
||||
"goimports"))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue