diff options
-rw-r--r-- | emacs/custom/my-prog.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el index 285befc..c63af84 100644 --- a/emacs/custom/my-prog.el +++ b/emacs/custom/my-prog.el @@ -67,7 +67,6 @@ (defun my/go-mode-hook () "Hooks for `go-mode'." - (add-hook 'before-save-hook 'gofmt-before-save) (setq tab-width 4) (set (make-local-variable 'compile-command) @@ -112,6 +111,9 @@ (dolist (hook '(go-mode-hook nix-mode-hook)) (add-hook hook 'eglot-ensure)) +;; rely on eglot to do the formatting for go buffers +(add-hook 'go-mode-hook #'(lambda() (add-hook 'before-save-hook 'eglot-format-buffer nil t))) + (provide 'my-prog) ;;; my-prog.el ends here |