diff options
author | Franck Cuny <franck@fcuny.net> | 2022-06-26 14:13:27 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-06-26 14:17:17 -0700 |
commit | 6f9019bb0410900e0fa2a11e8905da47afd7ffec (patch) | |
tree | 8cf0dd8a688d13c8cd5c5ccb70c7c754b4860066 | |
parent | feat(prog): enable tree-sitter (diff) | |
download | emacs.d-6f9019bb0410900e0fa2a11e8905da47afd7ffec.tar.gz |
feat(prog): require go-mode
Change-Id: I2b008d6039714475d7bbf487ac7674dd80b1bac4
-rw-r--r-- | emacs/custom/my-prog.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el index b1a0403..a198ce2 100644 --- a/emacs/custom/my-prog.el +++ b/emacs/custom/my-prog.el @@ -70,23 +70,21 @@ (add-hook 'makefile-mode-hook 'my/makefile-mode-hook) +(require 'go-mode) +(require 'gotest) + (defun my/go-mode-hook () "Hooks for `go-mode'." (setq tab-width 4) - - ;; format the buffer using gofmt, for reasons unclear, doing this - ;; with LSP is not working great. - (add-hook 'before-save-hook 'gofmt-before-save) + (setq go-test-verbose t) (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) + (define-key go-mode-map (kbd "C-c .") 'go-test-current-test) (define-key go-mode-map (kbd "C-c C-f") 'go-test-current-file) (define-key go-mode-map (kbd "C-c C-p") 'go-test-current-project)) |