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#69657: Missing imenu entries with eglot Date: Sun, 10 Mar 2024 19:33:58 +0000 Message-ID: References: <87frx0ze5n.fsf@mailbox.org> <87a5n8s8jw.fsf@betli.tmit.bme.hu> <87bk7oz6vc.fsf@mailbox.org> <87v85v1io3.fsf@betli.tmit.bme.hu> <87jzmat5qe.fsf@mailbox.org> <87frwxuc1w.fsf@mailbox.org> 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="35594"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69657@debbugs.gnu.org, Felician Nemeth To: Sebastian Poeplau Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 10 20:35:59 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 1rjOxj-00091Q-Qu for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Mar 2024 20:35:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjOxS-0002U7-Dc; Sun, 10 Mar 2024 15:35:42 -0400 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 1rjOxL-0002Ti-2G for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 15:35:35 -0400 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 1rjOxE-0004DT-B2 for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 15:35:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rjOxl-0002i7-NB for bug-gnu-emacs@gnu.org; Sun, 10 Mar 2024 15:36: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: Sun, 10 Mar 2024 19:36:01 +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.171009932710369 (code B ref 69657); Sun, 10 Mar 2024 19:36:01 +0000 Original-Received: (at 69657) by debbugs.gnu.org; 10 Mar 2024 19:35:27 +0000 Original-Received: from localhost ([127.0.0.1]:37922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjOxC-0002hA-Ns for submit@debbugs.gnu.org; Sun, 10 Mar 2024 15:35:27 -0400 Original-Received: from mail-lj1-f179.google.com ([209.85.208.179]:57443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rjOxA-0002gv-EQ for 69657@debbugs.gnu.org; Sun, 10 Mar 2024 15:35:25 -0400 Original-Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2d311081954so43090891fa.2 for <69657@debbugs.gnu.org>; Sun, 10 Mar 2024 12:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710099225; x=1710704025; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2b2KwsL8Zb8PRNAf2akkyyQUi4egOjSkHEe5Rf0Gip4=; b=E/o9v8iy5OBlCLBgDulNer4Sf8lHhbbBTQ9cd1LFUjDoSx8PXZKZjNGH55iMtUNswS 6cl4KYbip8hKYw4Ef0ezMquX4V9ONKdVsve5tXrXiMsFiRMlJQw250vsa5najZlhnqn7 JkYh7UtKimUJOx3fKlOhs9az56Lrs4U8SRXX11CqHSBArjpJ3Ljt9aRjNsnWgddNAFVZ K1KATseYfiaUCxuziCNiKiGTJqNya7lqDoTrhC8q0D58N5U2h0fLR9A14xnYMbEACOtL lnfqMNSn+FVTwupiS1GF5B4HqHMVNGKxAqxMRGjeD1dxyeu1cAB2KZBzxMPepqe/iaeW xirw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710099225; x=1710704025; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2b2KwsL8Zb8PRNAf2akkyyQUi4egOjSkHEe5Rf0Gip4=; b=nGH3NCaLWF1c+8JnpbXuW9IjiLqjMTc3CasN5QDe7DkAfTP3C5n74IwPwYnbr74KtV lybbO7oXHwYN7+o19GhziITZdM9IP/q5qDV5VbnyQUSqHWw6R7Gji5xtb41y6Pp7SArp 8ADB20yYuzRM7iwNwthEReSNKrVcrOAj12kFLjdRFSnl8lGtSJ7T3mzpBzGn9NOqECPU 2AsjIUIZVIok9YCJ3oDlBsZUQPNt4yPW1z8GTDzDDvOTgqZwmj99HWB+EQNPrY127QX9 bCvsr8HCg7ZulFHpUc0iLf6/L7HsBKwk8osXrGPgvrVhFe/NexUaRY2OydsDX9rq7F8V EwlQ== X-Forwarded-Encrypted: i=1; AJvYcCXnA1YFFthRmQmLuxOHV/YsiiyAQB6aSfuH9K79iekubs/o12tHD95cXSlPvxHvM5Ye2gmzR8j26G3MkdpY2oCDzXkSLjw= X-Gm-Message-State: AOJu0Yzquzayv5ZHWI9dSBLIDW2W4ZPoywXIobvkcde7Y1uC3cyy6IsU bZZKG862S7JBopPao4ZRx29JQzkqRuhtxfi8ZIXp3HKn9GZY4qYFniZYJgPj5qjLPrErlo+Pb1w Uic0+3+YRARaN7AWLvJmPujC/tO4= X-Google-Smtp-Source: AGHT+IEuIhc2hDBYDYLOTmak48Lihu25tsaAdcKEvikgbWz6qWmd41PzP1G96vfRwfv0Fla7QEBgLGQ/PHxMkDkf79c= X-Received: by 2002:a2e:8ece:0:b0:2d4:2e12:93fa with SMTP id e14-20020a2e8ece000000b002d42e1293famr2104093ljl.3.1710099224674; Sun, 10 Mar 2024 12:33:44 -0700 (PDT) In-Reply-To: <87frwxuc1w.fsf@mailbox.org> 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:281434 Archived-At: On Sun, Mar 10, 2024 at 7:22=E2=80=AFPM Sebastian Poeplau wrote: > Here's the return value of eglot-imenu with pylsp: > > ((#1=3D"Class" > (#("Foo" 0 3 (breadcrumb-kind #1# breadcrumb-region (1 . 44))) . 1)) > (#2=3D"Method" > ("Foo" (#("bar" 0 3 (breadcrumb-kind #2# breadcrumb-region (16 . 44)= )) . 16)))) > For completeness, this is pylsp's response to > textDocument/documentSymbol: See https://microsoft.github.io/language-server-protocol/specifications/lsp= /3.17/specification/#textDocument_documentSymbol pylsp does this because it is old, it uses SymbolInformation. clangd and most other servers use DocumentSymbol[] which is not only much more powerful and logical for represting a file's AST but also doesn't lend itself well to that structure of categorization, which is rather useless except for the fact that it makes leaves out of AST non-leaves. The problems are in Imenu. You should rather lobby for a better imenu structure (which will be hard to do fully backward compatibly will all existing UIs -- except if you use the string properties trick that Eglot/breadcrumb use as I explained) You could also lobby for a brand new imenu replacement in Emacs. Jo=C3=A3o