mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/go: group flycheck config & use add-hook
This commit is contained in:
@ -15,11 +15,11 @@
|
||||
(when-let* ((goimports (executable-find "goimports")))
|
||||
(setq gofmt-command goimports))
|
||||
|
||||
(setq gofmt-show-errors nil) ; Leave it to flycheck
|
||||
(if (featurep! :feature syntax-checker)
|
||||
(add-hook! 'go-mode-hook #'flycheck-mode))
|
||||
(when (featurep! :feature syntax-checker)
|
||||
(setq gofmt-show-errors nil) ; Leave it to flycheck
|
||||
(add-hook 'go-mode-hook #'flycheck-mode))
|
||||
|
||||
(add-hook! 'go-mode-hook #'go-eldoc-setup)
|
||||
(add-hook 'go-mode-hook #'go-eldoc-setup)
|
||||
(add-hook! go-mode
|
||||
(add-hook 'before-save-hook #'gofmt-before-save nil t))
|
||||
|
||||
|
Reference in New Issue
Block a user