lang/go: don't popup gofmt errors (use flycheck instead)

This commit is contained in:
Henrik Lissner 2018-02-02 03:00:57 -05:00
parent 5cb75da7e0
commit ec7f20589a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -6,7 +6,8 @@
:config
(add-hook 'go-mode-hook #'flycheck-mode)
(setq gofmt-command "goimports")
(setq gofmt-command "goimports"
gofmt-show-errors nil)
(if (not (executable-find "goimports"))
(warn "go-mode: couldn't find goimports; no code formatting/fixed imports on save")
(add-hook! go-mode (add-hook 'before-save-hook #'gofmt-before-save nil t)))