(use-package go-mode :ensure t :after (exec-path-from-shell flycheck flyspell) :hook (go-mode . fcuny/go-mode-setup) :init (defun fcuny/go-mode-setup () (setq tab-width 4) (add-hook 'before-save-hook 'gofmt-before-save)) :config (when (memq window-system '(mac ns)) (exec-path-from-shell-copy-env "GOPATH"))) (provide 'fcuny-go)