GNU bug report logs -
#69657
Missing imenu entries with eglot
Previous Next
Full log
Message #23 received at 69657 <at> debbugs.gnu.org (full text, mbox):
On Sun, Mar 10, 2024 at 7:22 PM Sebastian Poeplau
<sebastian.poeplau <at> mailbox.org> wrote:
> Here's the return value of eglot-imenu with pylsp:
>
> ((#1="Class"
> (#("Foo" 0 3 (breadcrumb-kind #1# breadcrumb-region (1 . 44))) . 1))
> (#2="Method"
> ("Foo" (#("bar" 0 3 (breadcrumb-kind #2# breadcrumb-region (16 . 44))) . 16))))
> For completeness, this is pylsp's response to
> textDocument/documentSymbol:
See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentSymbol
pylsp does this because it is old, it uses SymbolInformation.
clangd and most other servers use DocumentSymbol[] which is not
only much more powerful and logical for represting a file's AST but
also doesn't lend itself well to that structure of categorization, which
is rather useless except for the fact that it makes leaves out of AST
non-leaves.
The problems are in Imenu.
You should rather lobby for a better imenu structure (which will be
hard to do fully backward compatibly will all existing UIs -- except if
you use the string properties trick that Eglot/breadcrumb use as
I explained) You could also lobby for a brand new imenu replacement
in Emacs.
João
This bug report was last modified 1 year and 93 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.