GNU bug report logs -
#69683
28.2; eglot overrides imenu without fallback even when unsupported by server
Previous Next
Reported by: Phil Hagelberg <phil <at> hagelb.org>
Date: Sat, 9 Mar 2024 23:21:02 UTC
Severity: normal
Found in version 28.2
Done: Felician Nemeth <felician.nemeth <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Phil Hagelberg <phil <at> hagelb.org> writes:
> When invoking M-x imenu in a buffer with eglot enabled, it uses eglot's
> LSP-aware implementation of imenu. However, not all LSP servers handle
> that functionality. When connected to a server that does not offer this
> functionality, eglot signals an error:
>
> jsonrpc-error: "request id=11 failed:", (jsonrpc-error-code . -32601), (jsonrpc-error-message . "\"textDocument/documentSymbol\" is not in the request-handlers table"), (jsonrpc-error-data)
>
I'm surprised to see this error message since eglot-imenu starts with
this:
(cl-defun eglot-imenu ()
(unless (eglot-server-capable :documentSymbolProvider)
(cl-return-from eglot-imenu))
That is if the LSP server does not have the necessary capability it
doesn't send any jsonrpc messages to the server that would lead to the
error above. (And it falls back to normal imenu.)
Can you run edebug on eglot-imenu to see what I misunderstand?
This bug report was last modified 1 year and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.