Only attempt go install on save when in go-mode

This commit is contained in:
Ivan Malison 2016-08-10 11:59:01 -07:00
parent d62e0a8106
commit e120e75170
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -2281,6 +2281,8 @@ Pyimport is disabled because it may be causing a performance problem.
(go-eldoc-setup) (go-eldoc-setup)
(set (make-local-variable 'company-backends) '(company-go)) (set (make-local-variable 'company-backends) '(company-go))
(make-local-variable 'projectile-globally-ignored-files) (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 (add-to-list 'projectile-globally-ignored-files
"vendor"))) "vendor")))
:config :config
@ -2337,8 +2339,7 @@ Pyimport is disabled because it may be causing a performance problem.
(setq gofmt-command "goimports") (setq gofmt-command "goimports")
(add-hook 'go-mode-hook 'imalison:go-mode-hook) (add-hook 'go-mode-hook 'imalison:go-mode-hook)
(add-hook 'before-save-hook 'gofmt-before-save t) (add-hook 'before-save-hook 'gofmt-before-save t)))
(add-hook 'after-save-hook 'imalison:install-current-go-project)))
#+END_SRC #+END_SRC
***** Show diffs of testify output ***** Show diffs of testify output
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp