mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
fix(lsp): set-eglot-client!: single client declarations
Also mentions that MODE can be a list of major modes. Fix: #8528
This commit is contained in:
parent
37f4abd11c
commit
f727456a27
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,8 @@
|
||||||
(defun set-eglot-client! (mode &rest alternatives)
|
(defun set-eglot-client! (mode &rest alternatives)
|
||||||
"Set ALTERNATIVES as the given eglot lsp server for given major MODE.
|
"Set ALTERNATIVES as the given eglot lsp server for given major MODE.
|
||||||
|
|
||||||
|
MODE can be a list of major modes symbol or a single one.
|
||||||
|
|
||||||
MODE and ALTERNATIVES take after MAJOR-MODE and CONTACT in
|
MODE and ALTERNATIVES take after MAJOR-MODE and CONTACT in
|
||||||
`eglot-server-programs'. MODE can be one major mode symbol or a list thereof.
|
`eglot-server-programs'. MODE can be one major mode symbol or a list thereof.
|
||||||
ALTERNATIVES specifies how to connect to a server in those modes."
|
ALTERNATIVES specifies how to connect to a server in those modes."
|
||||||
|
|
@ -12,7 +14,7 @@ ALTERNATIVES specifies how to connect to a server in those modes."
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
(cons mode (if (cdr alternatives)
|
(cons mode (if (cdr alternatives)
|
||||||
(eglot-alternatives alternatives)
|
(eglot-alternatives alternatives)
|
||||||
alternatives)))))
|
(car alternatives))))))
|
||||||
|
|
||||||
;; HACK Eglot removed `eglot-help-at-point' in joaotavora/eglot@a044dec for a
|
;; HACK Eglot removed `eglot-help-at-point' in joaotavora/eglot@a044dec for a
|
||||||
;; more problematic approach of deferred to eldoc. Here, I've restored it.
|
;; more problematic approach of deferred to eldoc. Here, I've restored it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue