From 5991826f44cc95a3ad34a58f994005e3080ec87d Mon Sep 17 00:00:00 2001 From: kj Date: Tue, 14 Jul 2026 17:32:51 -0300 Subject: [PATCH] feat(go): switch to go-ts-mode and add auto-format on save --- configs/lang-go.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configs/lang-go.el b/configs/lang-go.el index 759784f..9cb0cd3 100644 --- a/configs/lang-go.el +++ b/configs/lang-go.el @@ -9,7 +9,15 @@ ;;; Code: -(use-package go-mode) +(use-package go-ts-mode + :ensure nil + :hook + (go-ts-mode . (lambda () + (add-hook 'before-save-hook + (lambda () + (ignore-errors (eglot-code-actions nil nil "source.organizeImports" t)) + (eglot-format-buffer)) + nil 'local)))) (provide 'lang-go) ;;; lang-go.el ends here