blob: 8d81f2c1d19471603fa8eede0033071b9c030fe1 (
plain) (
blame)
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
|
(use-package go-mode
:ensure t
:defer t
:config
(progn
(bind-key "C-c C-f" 'gofmt go-mode-map)
(bind-key "C-c h" 'godoc go-mode-map)
(bind-key "C-c C-g" 'go-goto-imports go-mode-map)
(bind-key "C-c C-r" 'go-remove-unused-imports go-mode-map))
:init
(progn (add-hook 'go-mode-hook (lambda ()
(go-eldoc-setup)
(add-hook 'before-save-hook 'gofmt-before-save)
(set (make-local-variable 'company-backends) '(company-go))))))
(use-package go-eldoc
:ensure t
:defer t
:init (add-hook 'go-mode-hook 'go-eldoc-setup))
(use-package company-go
:ensure t
:defer t)
(provide 'lang-go)
|