feat(go): switch to go-ts-mode and add auto-format on save
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user