branch: externals/eglot
commit 9da9d69a4296f2f0509c033a0aea263002ae5f4b
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
C-u M-x eglot discards class guessed by eglot--guess-contact
This will prevent C-u M-x eglot RET rust-analyzer from bringing into
play the eglot-rls server class, which is only valid for the default
RLS server.
Found when testing for #526, though this bug might not necessarily be
the problem being reported there.
* eglot.el (eglot--guess-contact): Don't assume guessed class if
INTERACTIVE.
---
eglot.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 9267a13..5bd087c 100644
--- a/eglot.el
+++ b/eglot.el
@@ -725,7 +725,8 @@ be guessed."
(guess (if (functionp guess)
(funcall guess interactive)
guess))
- (class (or (and (consp guess) (symbolp (car guess))
+ (class (or (and (not interactive)
+ (consp guess) (symbolp (car guess))
(prog1 (car guess) (setq guess (cdr guess))))
'eglot-lsp-server))
(program (and (listp guess)