diff --git a/contrib/lang/go/packages.el b/contrib/lang/go/packages.el index e3e7e0a4b..42fdfe9ec 100644 --- a/contrib/lang/go/packages.el +++ b/contrib/lang/go/packages.el @@ -1,10 +1,14 @@ (defvar go-packages '( + flycheck go-mode ) "List of all packages to install and/or initialize. Built-in packages which require an initialization must be listed explicitly in the list.") +(defun go/init-flycheck () + (add-hook 'go-mode-hook 'flycheck-mode)) + (defun go/init-go-mode() (use-package go-mode :defer t @@ -18,11 +22,7 @@ which require an initialization must be listed explicitly in the list.") "mpb" 'go-play-buffer "mpr" 'go-play-region "mpd" 'go-download-play - ) - ) + )) :config (add-hook 'before-save-hook 'gofmt-before-save) - (add-hook 'go-mode-hook 'flycheck-mode) - ) - ) - + ))