From 2019a8c49f3ac4a456d97ef56e967bd05c1f458f Mon Sep 17 00:00:00 2001 From: Gilbert Consellado <=> Date: Sun, 18 Mar 2018 21:05:40 +0800 Subject: [PATCH] Add go compile --- init.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.el b/init.el index 4e2fecd..f184898 100644 --- a/init.el +++ b/init.el @@ -612,8 +612,14 @@ before packages are loaded." ("data" . ?) ))) + (defun my/go-compile () + (if (not(string-match "go" compile-command)) + (set (make-local-variable 'compile-command) + "go build -v && go test -v && go vet"))) + (global-prettify-symbols-mode +1) (add-hook 'js2-mode-hook #'my/symbols-setup) + (add-hook 'go-mode-hook #'my/go-compile) ;; (evil-define-key '(normal motion) global-map "gs" (lambda () (interactive) (avy-goto-char-timer) (my-xref/find-definitions))) (evil-define-key '(normal motion) global-map "gs" 'avy-goto-char-timer)