From f727456a27d8d56b39d66c9a6e9984478e1163e5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 2 Dec 2025 19:48:33 -0500 Subject: [PATCH] fix(lsp): set-eglot-client!: single client declarations Also mentions that MODE can be a list of major modes. Fix: #8528 --- modules/tools/lsp/autoload/eglot.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/tools/lsp/autoload/eglot.el b/modules/tools/lsp/autoload/eglot.el index b541061aa..ae268ca84 100644 --- a/modules/tools/lsp/autoload/eglot.el +++ b/modules/tools/lsp/autoload/eglot.el @@ -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.