* eglot.el (eglot--guess-contact): Default language-id to educated
guess when eglot--lookup-mode returns nil.
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/837
(eglot--error "Can't guess mode to manage for `%s'" (current-buffer)))
(t guessed-mode)))
(lang-id-and-guess (eglot--lookup-mode guessed-mode))
- (language-id (car lang-id-and-guess))
+ (language-id (or (car lang-id-and-guess)
+ (string-remove-suffix "-mode" (symbol-name guessed-mode))))
(guess (cdr lang-id-and-guess))
(guess (if (functionp guess)
(funcall guess interactive)