diff options
author | Franck Cuny <franck@fcuny.net> | 2022-04-29 09:16:42 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-04-29 09:16:42 -0700 |
commit | 5843eda8c9080d45ad32bbac40de1dace837a209 (patch) | |
tree | 8cdbee47ca9bece75953684ba57a6c8836c20969 /emacs/custom | |
parent | ignore a few more things with recentf (diff) | |
download | emacs.d-5843eda8c9080d45ad32bbac40de1dace837a209.tar.gz |
go: define command for compiling
Diffstat (limited to 'emacs/custom')
-rw-r--r-- | emacs/custom/my-prog.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el index 50b0056..2a0f29a 100644 --- a/emacs/custom/my-prog.el +++ b/emacs/custom/my-prog.el @@ -68,8 +68,14 @@ (defun my/go-mode-hook () "Hooks for `go-mode'." (add-hook 'before-save-hook 'gofmt-before-save) - (customize-set-variable 'go-test-verbose t) (setq tab-width 4) + + (set (make-local-variable 'compile-command) + "go build -v && go test -v -cover") + (define-key go-mode-map (kbd "C-c C-r") 'compile) + (define-key go-mode-map (kbd "C-c C-R") 'recompile) + + (customize-set-variable 'go-test-verbose t) (define-key go-mode-map (kbd "C-c C-n") 'go-run) (define-key go-mode-map (kbd "C-c C-c") 'go-coverage) (define-key go-mode-map (kbd "C-c .") 'go-test-current-test) |