From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sebastian Poeplau via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69657: Missing imenu entries with eglot Date: Fri, 08 Mar 2024 23:28:26 +0100 Message-ID: <87bk7oz6vc.fsf@mailbox.org> References: <87frx0ze5n.fsf@mailbox.org> <87a5n8s8jw.fsf@betli.tmit.bme.hu> Reply-To: Sebastian Poeplau Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2006"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69657@debbugs.gnu.org To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 09 04:13:46 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rin9d-0000J3-68 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Mar 2024 04:13:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rin9R-0004uv-W1; Fri, 08 Mar 2024 22:13:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rin9P-0004uM-CV for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2024 22:13:32 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rin9P-0004jp-4S for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2024 22:13:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rin9v-0002ca-Fh for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2024 22:14:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sebastian Poeplau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2024 03:14:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69657 X-GNU-PR-Package: emacs Original-Received: via spool by 69657-submit@debbugs.gnu.org id=B69657.170995403510014 (code B ref 69657); Sat, 09 Mar 2024 03:14:03 +0000 Original-Received: (at 69657) by debbugs.gnu.org; 9 Mar 2024 03:13:55 +0000 Original-Received: from localhost ([127.0.0.1]:60014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rin9h-0002bH-Mv for submit@debbugs.gnu.org; Fri, 08 Mar 2024 22:13:55 -0500 Original-Received: from mout-p-202.mailbox.org ([80.241.56.172]:52400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riisg-00045r-67 for 69657@debbugs.gnu.org; Fri, 08 Mar 2024 17:40:01 -0500 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Ts1L01DLJz9spM; Fri, 8 Mar 2024 23:38:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1709937528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YPz9PBEVXINbfhsQFhkZu7IS48haGKKwyAmNGJmlRmo=; b=O9QeUoV/viO9yXXQ4bRkPxsWheHsfdL/OCNI/Ka6TZSXEUCDRUDS1WL+ThOblqDliZsTbC GEZxl41djV1Gk5QP8b1mNk/luJA2zNsgNMUQzBQCq7Bc4a6QbhRRf3FLKYSrDKtjp0y/9x J6JsavUcquKC7f8h3vU8JIZcOAHk1M9NaWtOGGpJV/XkrTrpt4egw0bfgtBF86obMU3kIv win6M4INWEr3Q1OZf4Dx/4WFquGWyp4+GoCTZYy/nPvn9Rp4qmUmbzB47JUUuUPnBDTwyq cSW0DXsnSizmt7sg0shCn3FeG7VsqAtnU08cEfAJoFkJjQANMOP+twkHuEadVw== In-reply-to: <87a5n8s8jw.fsf@betli.tmit.bme.hu> X-MBO-RS-META: qocwwqgu3tqafzjb3kg6erx8737fm6n3 X-MBO-RS-ID: df0f2ab9927de61c4a3 X-Mailman-Approved-At: Fri, 08 Mar 2024 22:13:44 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281286 Archived-At: > 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 } } } ] }