From 0a75acf4afa337adf448608310d592cd93cbc27a Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 22 Jul 2023 21:32:51 +0100 Subject: [PATCH] hotfix: indentation for Go --- lisp/languages.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/languages.el b/lisp/languages.el index a146408..88493b2 100644 --- a/lisp/languages.el +++ b/lisp/languages.el @@ -39,6 +39,13 @@ :config (add-hook 'before-save-hook 'gofmt-before-save)) ; Format on save +;; 4-space wide Go indentation +(add-hook 'go-mode-hook + (lambda () + (add-hook 'before-save-hook 'gofmt-before-save) + (setq tab-width 4) + (setq indent-tabs-mode 1))) + ;; Rust (use-package rust-mode :config