(defun fcuny/go-mode-setup () (setq tab-width 4) (setq comment-auto-fill-only-comments t) (setq fill-column 80) (auto-fill-mode 1)) (use-package go-mode :ensure t :after (exec-path-from-shell flycheck flyspell company hydra) :hook ((go-mode . fcuny/go-mode-setup) (go-mode . lsp-deferred) (before-save . lsp-format-buffer) (before-save . lsp-organize-imports)) :config (when (memq window-system '(mac ns)) (exec-path-from-shell-copy-env "GOPATH"))) (use-package gotest :ensure t :after go-mode :bind (:map go-mode-map ("C-c ." . go-test-current-test) ("C-c f" . go-test-current-file) ("C-c a" . go-test-current-project))) (provide 'fcuny-go)