feat(go): switch to go-ts-mode and add auto-format on save

This commit is contained in:
kj
2026-07-14 17:32:51 -03:00
parent 90dc7b6a77
commit 5991826f44

View File

@@ -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