summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-go.el
blob: 3926c9ef43fda6255fd906bc6a62c0c5a0db5bfb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
(use-package go-mode
  :ensure t
  :after (exec-path-from-shell)
  :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)