aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-15 21:44:13 -0500
committerCraig Jennings <c@cjennings.net>2026-06-15 21:44:13 -0500
commit3767febbfa9a9812fd79c183daba521ead4ce4f3 (patch)
tree3307e64477a1ea4e92061b2ebfebf70bcd2d4f29 /modules
parent3461586faf1b1846b66ee5cd7cb4e13e32fe56e9 (diff)
downloaddotemacs-3767febbfa9a9812fd79c183daba521ead4ce4f3.tar.gz
dotemacs-3767febbfa9a9812fd79c183daba521ead4ce4f3.zip
fix(prog-go): autoload gofmt so C-; f works under go-ts-mode
.go opens the built-in go-ts-mode, so nothing triggered the go-mode package: gofmt was never autoloaded (C-; f signalled void-function) and the :config setting goimports + exec-path never ran. Add :commands (gofmt) so the first format pulls go-mode and its config.
Diffstat (limited to 'modules')
-rw-r--r--modules/prog-go.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/prog-go.el b/modules/prog-go.el
index 8d0707b0..4b09f29c 100644
--- a/modules/prog-go.el
+++ b/modules/prog-go.el
@@ -108,6 +108,10 @@ Overrides default prog-mode keybindings with Go-specific commands."
;; go-ts-mode configuration (treesit-based Go editing)
(use-package go-mode
+ ;; .go opens the built-in go-ts-mode, so nothing ever triggers the go-mode
+ ;; package — gofmt was never autoloaded (void-function on C-; f) and :config
+ ;; never ran. Autoload gofmt so the first format pulls go-mode and its :config.
+ :commands (gofmt)
:hook ((go-ts-mode . cj/go-setup)
(go-ts-mode . cj/go-mode-keybindings))
:mode (("\\.go\\'" . go-ts-mode) ;; .go files use go-ts-mode