Subject: bug#61679: closed (Re: bug#61679: 29.0.60; Eglot: staying out of trouble)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 21 Feb 2023 15:54:02 +0000

Your bug report

#61679: 29.0.60; Eglot: staying out of trouble

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
61679: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61679
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#61679: 29.0.60; Eglot: staying out of trouble
From: João Távora <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 21 Feb 2023 15:53:36 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On Tue, Feb 21, 2023 at 3:53 PM João Távora <[email-masked]> wrote:
>
> On Tue, Feb 21, 2023 at 3:32 PM Augusto Stoffel <[email-masked]> wrote:
>
> > any case, it seems to support your point that servers without
> > diagnostics will be rare, so feel free to close the bug.
>
> OK.
>
> >
> > > If that's a mistake, then I guess it's meant to be used in conjunction
> > > with other language servers at the same time which complement its
> > > features.  Eglot doesn't support that, but I'm working on a solution,
> > > even though it will take time.
> >
> > Oh well, if multiple servers is the new trend, then I guess this might
> > become necessary...
>
> I'm not sure it's a new trend, but it has some use cases, yes.
> I think it was once more urgent than it is now, where some
> servers do the aggregation from multiple sources themselves.
>
> In the Eglot Github page there are a few discussions: the biggest
> use case I've seen described is for JavaScript which normally
> wants to have EsLint linting and also other types of servers.  But I
> think this also makes sense more generally.  A spell-checking server
> could go hand-in-hand with multiple programming servers.
>
> João

-- 
João Távora

Subject: 29.0.60; Eglot: staying out of trouble
From: Augusto Stoffel <[email-masked]>
To: [email-masked]
Date: Tue, 21 Feb 2023 15:31:23 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Eglot modifies several Emacs features, and it seems to do so
independently of the server capabilities.  For instance, it registers a
capf and Eldoc functions even if the server does't provide completions
respectively "hover"/signature help.

In some cases (capf, xref) this seems innocuous, in others (eldoc) Eglot
is really overwriting a possibly useful function with a possibly useless
one.

Now, the above are somewhat silly examples, but the Flymake case is
quite problematic.  There exist good servers that don't provide
diagnostics, and Eglot still overwrites `flymake-diagnostic-functions'.
To make things worse, LSP doesn't provide a way to the server to advertise
whether or not it provides diagnostics.

I would suggest that Elgot initially should keep
flymake-diagnostic-functions unchanged, and only overwrite it when the
first diagnostic comes from the server.