diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index f8e8c6050..88d1da442 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -16,8 +16,10 @@ (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)) - (add-hook! 'go-mode-hook #'(flycheck-mode 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)) diff --git a/modules/lang/go/doctor.el b/modules/lang/go/doctor.el index cf47a544d..512780ba6 100644 --- a/modules/lang/go/doctor.el +++ b/modules/lang/go/doctor.el @@ -9,5 +9,5 @@ (when (featurep! :completion company) (require 'company-go) - (unless (executable-find command-go-gocode-command) + (unless (executable-find company-go-gocode-command) (warn! "Couldn't find gocode. Code completion won't work")))