On Mon, Dec 11, 2023 at 5:21 PM Juri Linkov <j...@linkov.net> wrote:
> > By the way, this seems to be exactly what the breadcrumb-jump command > > in my breadcrumb.el package does. Goes reasonably well with a flex/fuzzy > > completion style. > > It would be great to have some form of breadcrumb-jump in imenu.el > since it's useful on its own even for someone who doesn't use breadcrumbs. You can copy it over, it doesn't really need breadcrumbs, though, it just needs imenu. The only things I'm seeing in its implementation in a penchant for a particular text property `breadcrumb-region`, which has information that imenu's structure didn't have a good place to place. But it's not required, as you noticed, I suppose it just gives it increased accuracy. > When eglot is enabled then imenu-create-index-function returns a tree. > > What is interesting is that breadcrumb-jump already correctly handles both > a flat list and a tree: Yes, that's the point. Though when using Eglot, the exact tree structure -- of any -- depends on the language server. João