summary refs log tree commit diff
path: root/emacs.d/inits/90_lang-go.el
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-01-03 10:00:07 -0800
committerFranck Cuny <franckcuny@gmail.com>2016-01-03 10:00:07 -0800
commitaaf7b46a382c70fccf17653602d40272cfd83659 (patch)
tree34136b1b007500aeeefe28199453be09e40f502d /emacs.d/inits/90_lang-go.el
parent[emacs] small UI update (diff)
downloademacs.d-aaf7b46a382c70fccf17653602d40272cfd83659.tar.gz
[emacs] gofmt on save
Closes #8.
Diffstat (limited to 'emacs.d/inits/90_lang-go.el')
-rw-r--r--emacs.d/inits/90_lang-go.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/emacs.d/inits/90_lang-go.el b/emacs.d/inits/90_lang-go.el
index 94c44ef..b20b467 100644
--- a/emacs.d/inits/90_lang-go.el
+++ b/emacs.d/inits/90_lang-go.el
@@ -19,4 +19,5 @@
   :init
   (progn (add-hook 'go-mode-hook (lambda ()
                                    (go-eldoc-setup)
+                                   (add-hook 'before-save-hook 'gofmt-before-save)
                                    (set (make-local-variable 'company-backends) '(company-go))))))