unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastian Poeplau via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Felician Nemeth <felician.nemeth@gmail.com>
Cc: 69657@debbugs.gnu.org
Subject: bug#69657: Missing imenu entries with eglot
Date: Fri, 08 Mar 2024 23:28:26 +0100	[thread overview]
Message-ID: <87bk7oz6vc.fsf@mailbox.org> (raw)
In-Reply-To: <87a5n8s8jw.fsf@betli.tmit.bme.hu>


> How do you invoke imenu?

I did M-x imenu, although I should add that I normally use
consult-imenu, which presents a flattened menu. That's also what I wrote
the patch for.

> If I type M-x imenu-add-menubar-index RET, then I cannot select "Foo"
> as you wrote above. However, if I apply the patch, the menu looks
> exactly the same.

Indeed, it seems that for regular imenu the patch doesn't make a
difference (presumably because both the category and the symbol have the
same name). I had tested that the entry for "Foo" is absent, but I guess
i should have verified that it shows up with the patch. In any case, for
users of consult-imenu (and possibly others) there's a benefit, also in
terms of consistency with language servers that use SymbolInformation.

> On the other hand, the patch seems to ruin breadcrumb-mode: putting
> the point after "{}", the breadcrumb header line shows: "dir/test.cpp:
> Class > Foo" instead of the original "dir/test.cpp: Class > Foo >
> bar".

If you move point _after_ "{}", you're outside of method "bar", aren't
you? Doesn't that mean the breadcrumb header is correct now and was
wrong before?

> $ clangd --version
> Debian clangd version 14.0.6
> Features: linux+grpc

I tested with clangd 15 from the Ubuntu repositories and clangd 17 from
the repositories maintained by the LLVM project (for Ubuntu and Debian).
But I don't think this is a matter of clangd versions; for the record,
this is the textDocument/documentSymbol response I'm getting for the
example in my original message:

{
  "id": 5,
  "jsonrpc": "2.0",
  "result": [
    {
      "children": [
        {
          "detail": "void ()",
          "kind": 6,
          "name": "bar",
          "range": {
            "end": {
              "character": 15,
              "line": 1
            },
            "start": {
              "character": 2,
              "line": 1
            }
          },
          "selectionRange": {
            "end": {
              "character": 10,
              "line": 1
            },
            "start": {
              "character": 7,
              "line": 1
            }
          }
        }
      ],
      "detail": "class",
      "kind": 5,
      "name": "Foo",
      "range": {
        "end": {
          "character": 1,
          "line": 2
        },
        "start": {
          "character": 0,
          "line": 0
        }
      },
      "selectionRange": {
        "end": {
          "character": 9,
          "line": 0
        },
        "start": {
          "character": 6,
          "line": 0
        }
      }
    }
  ]
}





  reply	other threads:[~2024-03-08 22:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 20:01 bug#69657: Missing imenu entries with eglot Sebastian Poeplau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-08 21:44 ` Felician Nemeth
2024-03-08 22:28   ` Sebastian Poeplau via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-03-09 16:20     ` Felician Nemeth
2024-03-10  1:05       ` João Távora
2024-03-10 16:15         ` Sebastian Poeplau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-10 19:15           ` Sebastian Poeplau via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-10 19:33             ` João Távora
2024-03-17 11:04               ` Sebastian Poeplau via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87bk7oz6vc.fsf@mailbox.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=69657@debbugs.gnu.org \
    --cc=felician.nemeth@gmail.com \
    --cc=sebastian.poeplau@mailbox.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).