init.el: Execute gofmt-before-save only if go mode gets enabled

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2019-02-22 16:32:49 +05:30
parent 594c11169c
commit 8fece8c12c

View file

@ -725,6 +725,8 @@
:defer t
:init
(setq-local tab-width 8)
:config
(add-hook 'before-save-hook 'gofmt-before-save)
:hook
(go-mode . company-mode))