From 8fece8c12c8f63935fa8ffbe8f5b3d320b4f2ba3 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 22 Feb 2019 16:32:49 +0530 Subject: [PATCH] init.el: Execute gofmt-before-save only if go mode gets enabled Signed-off-by: Sanchayan Maity --- init.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.el b/init.el index bef47d0..8156c9f 100644 --- a/init.el +++ b/init.el @@ -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))