diff options
Diffstat (limited to 'modules/prog-go.el')
| -rw-r--r-- | modules/prog-go.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/prog-go.el b/modules/prog-go.el index 0edfc2065..4b09f29c3 100644 --- a/modules/prog-go.el +++ b/modules/prog-go.el @@ -61,7 +61,7 @@ Install with: go install github.com/go-delve/delve/cmd/dlv@latest") (setq-local tab-width 4) ;; Go standard tab width (setq-local standard-indent 4) ;; indent 4 spaces per level (setq-local indent-tabs-mode t) ;; use real tabs (Go convention) - (electric-pair-mode t) ;; match delimiters automatically + (electric-pair-local-mode t) ;; match delimiters automatically ;; Enable LSP if available (when (and (fboundp 'lsp-deferred) @@ -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 |
