blob: d925cf697fef3d96312898497275c75884f65198 (
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
26
|
(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)
|