aboutsummaryrefslogtreecommitdiff
path: root/.emacs.local.d/modes/go-lang.el
blob: ad0b30764b69630308eae7a75f9cfde2f3adfd9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;; Debian packages: elpa-go-mode
;; Elpa packages: go-eldoc

(use-package go-mode
  :ensure t
  :init
  (progn
    (bind-key [remap find-tag] #'godef-jump))
  :config
  (add-hook 'go-mode-hook 'electric-pair-mode)
  (add-hook 'go-mode-hook 'my-go-mode-hook))

(use-package go-eldoc
  :ensure t
  :defer
  :init
  (add-hook 'go-mode-hook 'go-eldoc-setup))

;; Define function to call when go-mode loads
(defun my-go-mode-hook ()
  (set 'compile-command "go build -v && go test -v && go vet"))
nihil fit ex nihilo