diff options
author | Franck Cuny <franck@fcuny.net> | 2023-03-27 19:27:49 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-03-27 19:27:49 -0700 |
commit | 549001a43bd12a4354c8917bc12056434c9d2b0e (patch) | |
tree | 36fd48cb64b7d103625dab3d3e1d0baa3c07ec8f | |
parent | Makefile: create some directories (diff) | |
download | emacs.d-549001a43bd12a4354c8917bc12056434c9d2b0e.tar.gz |
go: fix the configuration
Change-Id: I2e801c7221f37874380d36d883d77c2b9676913c
-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) |