diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/custom/my-lang-go.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/emacs/custom/my-lang-go.el b/emacs/custom/my-lang-go.el index c5181fa..7dde8c4 100644 --- a/emacs/custom/my-lang-go.el +++ b/emacs/custom/my-lang-go.el @@ -9,14 +9,16 @@ (require 'gotest) (require 'eglot) -(defun my/go-mode-setup () - "Hooks for `go-mode'." - (setq tab-width 4) - (setq go-test-verbose t)) - (add-hook 'go-mode-hook 'eglot-ensure) -(add-hook 'go-mode-hook #'(lambda() (add-hook 'before-save-hook 'eglot-format-buffer nil t))) -(add-hook 'go-mode-hook #'my/go-mode-setup) + +(add-hook 'go-mode-hook + (lambda () + (setq tab-width 4) + (setq compile-command "go build -v && go test -v && go vet"))) + +(add-hook 'go-mode-hook + (lambda() + (add-hook 'before-save-hook 'eglot-format-buffer nil t))) (provide 'my-lang-go) |