summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMartin Polden <martin.polden@gmail.com>2015-02-25 20:00:26 +0100
committerMartin Polden <martin.polden@gmail.com>2015-02-25 20:00:38 +0100
commit1fe474f32e2b187f6376fcf4213928ffc424873a (patch)
tree8964fa271ae9040b38f073c86ab481134affcff8 /lisp
parenta84b433022341f8ed431c89e92aa13ebaf3c9200 (diff)
Run gofmt before saving file
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-go-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/init-go-mode.el b/lisp/init-go-mode.el
index 1144022..a06fb21 100644
--- a/lisp/init-go-mode.el
+++ b/lisp/init-go-mode.el
@@ -48,4 +48,7 @@ items follow a style that is consistent with other prog-modes."
(setq-local imenu-create-index-function
#'go-mode-create-flat-imenu-index)))
+;; run gofmt before saving file
+(add-hook 'before-save-hook 'gofmt-before-save)
+
(provide 'init-go-mode)