From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#58431: 29.0.50; [Eglot] Add "breadcrumb.el" feature based on imenu.el/project.el services Date: Tue, 11 Oct 2022 10:17:20 +0100 Message-ID: <87czayra73.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13733"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org To: 58431@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 11 11:18:19 2022 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 1oiBP1-0003Lc-DW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 11:18:19 +0200 Original-Received: from localhost ([::1]:50418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiBOz-0002DQ-RD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Oct 2022 05:18:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiBNm-00028k-JM for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 05:17:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiBNm-0006N9-9Z for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 05:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiBNl-0002En-R1 for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 05:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2022 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58431 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16654797778538 (code B ref -1); Tue, 11 Oct 2022 09:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Oct 2022 09:16:17 +0000 Original-Received: from localhost ([127.0.0.1]:50896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiBN3-0002Dd-1T for submit@debbugs.gnu.org; Tue, 11 Oct 2022 05:16:17 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiBN1-0002DW-7a for submit@debbugs.gnu.org; Tue, 11 Oct 2022 05:16:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiBN0-0001aa-W8 for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2022 05:16:15 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiBMz-0006IE-68; Tue, 11 Oct 2022 05:16:14 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id w18so20606237wro.7; Tue, 11 Oct 2022 02:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=I0IkWyea3/I7voMsROabyNheve9wRvtXbacErCrnWZk=; b=hJrpA2x342yB0svnZN/I1tjF4Gm2d/vAg92WY8oun0UY3yAqawQzU6voswoVOzKc/y c5kxATS8DNXMpkgVnNqOn817CJVVrtKgE8gpWLVimVeUcN8pgku7gxHQRrEmQfNt5WrX ICZr0h96yboZsSC0qblQKUkHav0ERyPRZNIAn7I2AtjEOpnlBIbmqPvMiPODa39Sb4ZP wP8ekC7h8cMgQdR1NM3RXQyJk9J5i0CbQZioVNdAhCkWJicDd6MErYk171QbtntzvGkL SPljAnhxPlxxfHDtp6BUAl0KqECm476iy2mleTV1VzTGJwFHpwey166aRusV8gmQJk08 8+6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I0IkWyea3/I7voMsROabyNheve9wRvtXbacErCrnWZk=; b=lHYmq2YPHSdS1GEdPsaClKtQgGFtOz2HVbh/rV9CKFj62gT7AaqDVf8Lx1u9LvTtzC 1MMy747igmylJQ3ouAprixkp3HLoQDWkfhirhL2eDDMSEufe7QcrfBin/nnIrWUVFQbv p6XItlpPOaMbYCZRCNmMITtlkYYhcMUSXZ355KNFlg2TmH7tbPBvokLaSCLFOXwW5Rrd HivwU+N5kKWwzkPw+EkciUUvSQYVDNr5rnBhTmGwiqSXtssRreWNhr5UYcYS4U0vwkCr uYvkeN7spGFg9FoaXRyUDZ90SHqnhXTkSD24R2egWY733LhrSnWqDkuogT9xyT2QF2Gu u+bg== X-Gm-Message-State: ACrzQf3EM/z8+E/kVMNspYr+gGCOeKtI4TLHfpUaZ+ZYl50qt+1/4FaE yoEEaHaHpOBrReFhWf48Rf/l/Aevi38= X-Google-Smtp-Source: AMsMyM7ANj6wK1r/urAbNi9HZDgmEzDF6JYUgyZ0RCMudrS2AJv/Fu9lzGiq1ekswzW4o+60KRAFyg== X-Received: by 2002:adf:8bc5:0:b0:22e:3873:276d with SMTP id w5-20020adf8bc5000000b0022e3873276dmr13954800wra.402.1665479770430; Tue, 11 Oct 2022 02:16:10 -0700 (PDT) Original-Received: from krug (87-196-72-225.net.novis.pt. [87.196.72.225]) by smtp.gmail.com with ESMTPSA id j10-20020a05600c190a00b003c6b7f5567csm2459927wmq.0.2022.10.11.02.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 02:16:09 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:245099 Archived-At: Hello, This request for a "breadcrumb" feature started in Eglot's bug tracker: =20=20=20 https://github.com/joaotavora/eglot/discussions/988 Put it short, a breadcrumb is a summarized indication of the full path to the current location of point within a source file. So if I have a file 'baz.cpp' inside a directory 'bars' of a project directory 'foo' and that file contains: class Baz { int quux() { return 42; // point here } // or here }; Then the breadcrumb would read: foo > bars > baz.cpp > Baz > quux If I move my point to outside quux(), the breadcrumb should now read: foo > bars > baz.cpp > Baz The preferred location of this breadcrumb readout should be the headerline. In the original Eglot request, users are requesting this UI feature for the Eglot LSP client. But this doesn't have any LSP-specific interactions. It can and should be done entirely by using the services provided by imenu.el and project.el. Eglot already integrates with Imenu, so as soon as this hypothetical breadcrumb.el is in place, then Eglot users can take advantage of it. This is similar to which-func.el, which displays the trailing element of the breadcrumb in the headerline. Perhaps the breadcrumb feature can be thought of as an augmentation of which-func.el's functionality. I don't have a strong opinion there. Jo=C3=A3o PS: Eli, I'm CCing you to underline this as just an example of a UI feature that is requested for Eglot, but belongs somewhere else. In this case, I believe there is 0 additional integration needed in eglot.el: it can be realized independently of the backend which feeds into Imenu (perhaps tree-sitter?) and project.el.