unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu
@ 2021-09-26 12:46 Augusto Stoffel
  2022-09-02 10:52 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Augusto Stoffel @ 2021-09-26 12:46 UTC (permalink / raw)
  To: 50816; +Cc: João Távora

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu
  2021-09-26 12:46 bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu Augusto Stoffel
@ 2022-09-02 10:52 ` Lars Ingebrigtsen
  2022-09-02 11:06   ` João Távora
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-02 10:52 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 50816, João Távora

Augusto Stoffel <arstoffel@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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu
  2022-09-02 10:52 ` Lars Ingebrigtsen
@ 2022-09-02 11:06   ` João Távora
  2022-09-02 12:13     ` Augusto Stoffel
  0 siblings, 1 reply; 5+ messages in thread
From: João Távora @ 2022-09-02 11:06 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50816, Augusto Stoffel

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

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@gnus.org> wrote:

> Augusto Stoffel <arstoffel@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

[-- Attachment #2: Type: text/html, Size: 1752 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu
  2022-09-02 11:06   ` João Távora
@ 2022-09-02 12:13     ` Augusto Stoffel
  2022-09-02 12:24       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Augusto Stoffel @ 2022-09-02 12:13 UTC (permalink / raw)
  To: João Távora; +Cc: Lars Ingebrigtsen, 50816

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu
  2022-09-02 12:13     ` Augusto Stoffel
@ 2022-09-02 12:24       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-02 12:24 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: 50816, João Távora

Augusto Stoffel <arstoffel@gmail.com> writes:

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

OK; done.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-02 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26 12:46 bug#50816: 28.0.50; [eglot] Nonstandard SymbolKind values for imenu Augusto Stoffel
2022-09-02 10:52 ` Lars Ingebrigtsen
2022-09-02 11:06   ` João Távora
2022-09-02 12:13     ` Augusto Stoffel
2022-09-02 12:24       ` Lars Ingebrigtsen

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).