GNU bug report logs - #69657
Missing imenu entries with eglot

Previous Next

Package: emacs;

Reported by: Sebastian Poeplau <sebastian.poeplau <at> mailbox.org>

Date: Fri, 8 Mar 2024 20:33:02 UTC

Severity: normal

Full log


Message #20 received at 69657 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Poeplau <sebastian.poeplau <at> mailbox.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 69657 <at> debbugs.gnu.org, Felician Nemeth <felician.nemeth <at> gmail.com>
Subject: Re: bug#69657: Missing imenu entries with eglot
Date: Sun, 10 Mar 2024 17:15:49 +0100
> I understand Sebastian wants to see an extra top-evel ("Foo" . 1) there
> or something, but that leads to two entries with duplicate names and imenu
> just doesn't like that (if I apply the patch I just can't go to 'bar' with M
> -x imenu), neither do some of its clients.

What about naming the separate entry differently, e.g., "Foo (top)"?
I'll certainly look into using the breadcrumb metadata instead, but that
doesn't help users of plain imenu.

> This is way Eglot emits "breadcrumb"-friendly cookies to overcome imenu's
> limitations.   Using breadcrumb i can jump to Foo and Foo > bar just
> fine (using
> `M-x breadcrumb-jump`).

Thanks for the hint, I didn't know about `breadcrumb-jump'; I'd only
used the headline feature before.

> Anyway, if users don't like Eglot's imenu function, they can use something
> else.  Eglot's imenu is different from c++-ts-mode, and afaik c++-ts-mode's is
> already different from c++-mode's.  I wouldn't install this patch though,
> teach other UIs about those optional cookies seems like a better deal that
> doesn't break stuff.

I wonder why I did get separate entries in consult-imenu with pylsp
though. I'll have to give it another look, but it seems to me that in
this case (e.g., with SymbolInformation objects) eglot's imenu function
returns data that (a) works with plain imenu and (b) gives me what I
expect with consult-imenu.




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.