diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 88d1da442..1089d5905 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -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))