blob: c9e9b73e5625bef711d8e374a07a462fbc6ca8b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(use-package eglot
:hook
;; enable eglot in go-mode
;; requires gopls: env GO111MODULE=on go get golang.org/x/tools/gopls@latest
((go-mode . eglot-ensure)
;; format on save
(before-save . eglot-format))
:bind (:map eglot-mode-map
;; C-c r renames identifier
("C-c r" . eglot-rename)
;; C-c f formats buffer
("C-c f" . eglot-format))
:config
;; disble symbol highlighting
(setq eglot-ignored-server-capabilites '(:documentHighlightProvider))
;; disable imenu integration as it's currently unsupported with gopls
;; https://github.com/joaotavora/eglot/pull/303
(setq eglot-stay-out-of '("imenu")))
(provide 'init-eglot)
|