unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Felician Nemeth <felician.nemeth@gmail.com>
To: Phil Hagelberg <phil@hagelb.org>
Cc: 69683@debbugs.gnu.org
Subject: bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server
Date: Sun, 10 Mar 2024 10:46:04 +0100	[thread overview]
Message-ID: <87v85uzag3.fsf@betli.tmit.bme.hu> (raw)
In-Reply-To: <87edcjt2ma.fsf@hagelb.org> (Phil Hagelberg's message of "Sat, 09 Mar 2024 23:19:25 +0000")

Phil Hagelberg <phil@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?





  parent reply	other threads:[~2024-03-10  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09 23:19 bug#69683: 28.2; eglot overrides imenu without fallback even when unsupported by server Phil Hagelberg
2024-03-10  5:53 ` Eli Zaretskii
2024-03-10 11:02   ` João Távora
2024-03-10  9:46 ` Felician Nemeth [this message]
2024-03-10 19:27   ` Phil Hagelberg
2024-03-11  8:43     ` Felician Nemeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v85uzag3.fsf@betli.tmit.bme.hu \
    --to=felician.nemeth@gmail.com \
    --cc=69683@debbugs.gnu.org \
    --cc=phil@hagelb.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).