GNU bug report logs -
#69657
Missing imenu entries with eglot
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
For language servers that reply to the textDocument/documentSymbol
request with instances of DocumentSymbol rather than SymbolInformation,
eglot's imenu builder omits symbols containing other symbols. This
applies to eglot 1.17 from ELPA as well as the version in Emacs master
as of today.
You can use clangd to reproduce the problem:
1. Put this code in a C++ source file, e.g., test.cpp:
class Foo {
void bar() {}
};
2. Start eglot with clangd.
3. Invoke imenu; there will be a single entry "bar", nested under "Foo".
In particular, there is no entry that lets you jump to Foo.
This is inconsistent with how eglot handles language servers that return
SymbolInformation (e.g., pylsp), and I would argue that it's not what
users expect. The attached patch fixes the behavior by inserting a
dedicated entry for each symbol in addition to entries for its children.
[0001-Eglot-include-containers-in-imenu.patch (text/x-diff, attachment)]
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.