From e120e751706f3b9490b9aa5073deca3ac39ed920 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 10 Aug 2016 11:59:01 -0700 Subject: [PATCH] Only attempt go install on save when in go-mode --- dotfiles/emacs.d/README.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index c7420ae7..21c0cfa3 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2281,6 +2281,8 @@ Pyimport is disabled because it may be causing a performance problem. (go-eldoc-setup) (set (make-local-variable 'company-backends) '(company-go)) (make-local-variable 'projectile-globally-ignored-files) + (add-hook 'after-save-hook 'imalison:install-current-go-project nil + 'yes-do-local) (add-to-list 'projectile-globally-ignored-files "vendor"))) :config @@ -2337,8 +2339,7 @@ Pyimport is disabled because it may be causing a performance problem. (setq gofmt-command "goimports") (add-hook 'go-mode-hook 'imalison:go-mode-hook) - (add-hook 'before-save-hook 'gofmt-before-save t) - (add-hook 'after-save-hook 'imalison:install-current-go-project))) + (add-hook 'before-save-hook 'gofmt-before-save t))) #+END_SRC ***** Show diffs of testify output #+BEGIN_SRC emacs-lisp