blob: 0554f2b3d4384a4f48da24ebeac5a5f3a15746ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
;; 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 #'lsp-go-install-save-hooks)
(add-hook 'go-mode-hook #'lsp-deferred)
(add-hook 'go-mode-hook #'yas-minor-mode)
(add-hook 'go-mode-hook 'electric-pair-mode)
(add-hook 'go-mode-hook 'my-go-mode-hook)
(add-hook 'before-save-hook 'gofmt-before-save)
)
(use-package go-eldoc
:ensure t
: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"))
|