diff options
Diffstat (limited to '.emacs.d/lisp/init-go.el')
-rw-r--r-- | .emacs.d/lisp/init-go.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-go.el b/.emacs.d/lisp/init-go.el index f0a6b84..3a224fb 100644 --- a/.emacs.d/lisp/init-go.el +++ b/.emacs.d/lisp/init-go.el @@ -1,4 +1,5 @@ (when (gx/maybe-require-package 'go-mode) + (autoload #'go-mode "go-mode" nil t) (add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))) (add-hook 'go-mode-hook (lambda () (setq tab-width 4))) @@ -6,8 +7,8 @@ (gx/maybe-require-package 'go-dlv) (when (gx/maybe-require-package 'eglot) - (add-hook 'go-mode-hook #'eglot-ensure) (add-hook 'go-mode-hook #'gx/eglot-format-before-save) - (add-hook 'go-mode-hook #'gx/eglot-code-action-organize-imports-before-save)) + (add-hook 'go-mode-hook #'gx/eglot-code-action-organize-imports-before-save) + (add-hook 'go-mode-hook #'eglot-ensure)) (provide 'init-go) |