@@ -8,6 +8,7 @@ Should work with go mod projects.
8
8
Most of the heavy lifting should be ~lsp~ and ~gopls~
9
9
** Role of older tools
10
10
This is based on how spacemacs go layer was structured, however key elements are changing for go mod support. Hence this is going to be in flux.
11
+
11
12
* Go Mode and hooks
12
13
13
14
#+BEGIN_SRC emacs-lisp
@@ -31,7 +32,8 @@ This is based on how spacemacs go layer was structured, however key elements are
31
32
(add-hook 'go-mode-hook 'flycheck-mode)
32
33
33
34
(add-hook 'go-mode-hook '(lambda ()
34
- (local-set-key (kbd "C-c C-r") 'go-remove-unused-imports)))
35
+ (local-set-key (kbd "C-c C-r") 'go-remove-unused-imports)
36
+ (local-set-key (kbd "C-c b") 'go-run)))
35
37
(add-hook 'go-mode-hook '(lambda ()
36
38
(local-set-key (kbd "C-c C-g") 'go-goto-imports)))
37
39
(add-hook 'go-mode-hook (lambda ()
@@ -42,6 +44,19 @@ This is based on how spacemacs go layer was structured, however key elements are
42
44
(before-save . lsp-organize-imports)))
43
45
#+END_SRC
44
46
47
+ * Testing
48
+ #+BEGIN_SRC emacs-lisp
49
+ (use-package gotest
50
+ :ensure t
51
+ :config
52
+ (add-hook 'go-mode-hook '(lambda ()
53
+ (local-set-key (kbd "C-c a") 'go-test-current-project)
54
+ (local-set-key (kbd "C-c m") 'go-test-current-file)
55
+ (local-set-key (kbd "C-c ,") 'go-test-current-test)
56
+ ))
57
+
58
+ )
59
+ #+END_SRC
45
60
* Go Completion
46
61
#+Name: dump
47
62
#+BEGIN_SRC emacs-lisp
@@ -86,7 +101,6 @@ This is based on how spacemacs go layer was structured, however key elements are
86
101
(use-package go-snippets
87
102
:ensure t)
88
103
#+END_SRC
89
-
90
104
* babel support
91
105
#+NAME: babel
92
106
#+BEGIN_SRC emacs-lisp
0 commit comments