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:
Henrik Lissner 2025-12-02 19:48:33 -05:00
parent 37f4abd11c
commit f727456a27
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -5,6 +5,8 @@
(defun set-eglot-client! (mode &rest alternatives)
"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
`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."
@ -12,7 +14,7 @@ ALTERNATIVES specifies how to connect to a server in those modes."
(add-to-list 'eglot-server-programs
(cons mode (if (cdr alternatives)
(eglot-alternatives alternatives)
alternatives)))))
(car alternatives))))))
;; 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.