GNU bug report logs - #50816
28.0.50; [eglot] Nonstandard SymbolKind values for imenu

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sun, 26 Sep 2021 12:47:01 UTC

Severity: normal

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50816 in the body.
You can then email your comments to 50816 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to joaotavora <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#50816; Package emacs. (Sun, 26 Sep 2021 12:47:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to joaotavora <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Sun, 26 Sep 2021 12:47:01 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu
Date: Sun, 26 Sep 2021 14:46:26 +0200
This more about the LSP spec than Eglot, but anyway: I would like to
make the Digestif server provide document outlines via the
`textDocument.documentSymbol' method.  This is not a big deal, and is
implemented internally by the Digestif library already.  Here's the
problem, though: what should I provide as the DocumentSymbol.kind?

The main constituents of a TeX document outline are chapters, sections
and environments.  However, the `kind' attribute of a DocumentSymbol is
not just some name, as one would reasonably expect.  Instead, it's a
number, which the LSP client then looks up in a hardcoded table [🤦].
So in theory one is constrained to the SymbolKinds mentioned in the
spec, none of which is remotely suitable for TeX.

Is there some Eglot-friendly way to get around this silly limitation?

Note that the TeX case may be extreme, but many "normal" programming
languages will have a couple of symbol kinds that don't quite fit that
table.  ELisp has faces, Haskell has typeclasses, and so on.

[🤦]:
https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#symbolKind




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50816; Package emacs. (Fri, 02 Sep 2022 10:54:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50816 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for
 imenu
Date: Fri, 02 Sep 2022 12:52:51 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> The main constituents of a TeX document outline are chapters, sections
> and environments.  However, the `kind' attribute of a DocumentSymbol is
> not just some name, as one would reasonably expect.  Instead, it's a
> number, which the LSP client then looks up in a hardcoded table [🤦].
> So in theory one is constrained to the SymbolKinds mentioned in the
> spec, none of which is remotely suitable for TeX.
>
> Is there some Eglot-friendly way to get around this silly limitation?

This was almost a year ago, so I'm not sure whether it's still relevant,
but in case it is -- João, do you have any comments here?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50816; Package emacs. (Fri, 02 Sep 2022 11:06:01 GMT) Full text and rfc822 format available.

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

From: João Távora <joaotavora <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50816 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#50816: 28.0.50;
 [eglot] Nonstandard SymbolKind values for imenu
Date: Fri, 2 Sep 2022 12:06:29 +0100
[Message part 1 (text/plain, inline)]
From  reading the original description, I do think this is more about LSP
than Eglot.

I haven't given much thought into it, but I don't think Eglot can do
anything
reasonable outside the standard here. And even if it could, not sure if it
should.

I'd venture to say that this should be brought up with Microsoft's
specification
instead.

João

On Fri, Sep 2, 2022 at 11:52 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
> > The main constituents of a TeX document outline are chapters, sections
> > and environments.  However, the `kind' attribute of a DocumentSymbol is
> > not just some name, as one would reasonably expect.  Instead, it's a
> > number, which the LSP client then looks up in a hardcoded table [🤦].
> > So in theory one is constrained to the SymbolKinds mentioned in the
> > spec, none of which is remotely suitable for TeX.
> >
> > Is there some Eglot-friendly way to get around this silly limitation?
>
> This was almost a year ago, so I'm not sure whether it's still relevant,
> but in case it is -- João, do you have any comments here?
>


-- 
João Távora
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50816; Package emacs. (Fri, 02 Sep 2022 12:14:01 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 50816 <at> debbugs.gnu.org
Subject: Re: bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for
 imenu
Date: Fri, 02 Sep 2022 14:13:26 +0200
Looking back at this, I agree there is nothing meaningful Eglot can do,
so we should close the ticket.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50816; Package emacs. (Fri, 02 Sep 2022 12:25:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 50816 <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for
 imenu
Date: Fri, 02 Sep 2022 14:24:23 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> Looking back at this, I agree there is nothing meaningful Eglot can do,
> so we should close the ticket.

OK; done.




bug closed, send any further explanations to 50816 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 02 Sep 2022 12:25:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.