summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-prog.el12
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))