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:
parent
594c11169c
commit
8fece8c12c
1 changed files with 2 additions and 0 deletions
2
init.el
2
init.el
|
@ -725,6 +725,8 @@
|
||||||
:defer t
|
:defer t
|
||||||
:init
|
:init
|
||||||
(setq-local tab-width 8)
|
(setq-local tab-width 8)
|
||||||
|
:config
|
||||||
|
(add-hook 'before-save-hook 'gofmt-before-save)
|
||||||
:hook
|
:hook
|
||||||
(go-mode . company-mode))
|
(go-mode . company-mode))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue