GNU bug report logs - #61679
29.0.60; Eglot: staying out of trouble

Previous Next

Package: emacs;

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

Date: Tue, 21 Feb 2023 14:32:02 UTC

Severity: normal

Found in version 29.0.60

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: João Távora <joaotavora <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 61679 <at> debbugs.gnu.org
Subject: Re: bug#61679: 29.0.60; Eglot: staying out of trouble
Date: Tue, 21 Feb 2023 15:00:47 +0000
On Tue, Feb 21, 2023 at 2:32 PM Augusto Stoffel <arstoffel <at> gmail.com> wrote:
>
> 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.

In the Eldoc case, as of yesterday, this no longer happens.

Look at

commit e83c78b8c7784254c2c6f043530ab325c2fa7f16
Author: João Távora <joaotavora <at> gmail.com>
Date:   Mon Feb 20 22:43:50 2023 +0000

    Eglot: respect user's Eldoc configuration by default

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

This seems way too complicated for a problem that hasn't even been
demonstrated.  The reason there's no capability announcement for
diagnostics is likely because it's such a basic capability that
virtually every server supports it, unless you go out of your way
to find or craft one that doesn't.

When activating Eglot, you're saying "let this here LSP server
manage my buffer by connecting it with these Emacs infrastructures"
You're letting go of some of your major-mode's configuration
and user configuration for what is in 99% of the cases a much more
integrated and hassle-free IDE experience.

Even so, Eglot only temporarily overrides your configuration and
will not do so gratuitously, as the commit above illustrates.  In
Flymake's case, it is really important to override the value by
default or else super-popular languages like Python handled by
python mode start showing confusing duplicate diagnostics to
newbie users, and we don't want that.

If you really like your pre-Eglot configuration, you can combine
it with Eglot's by leveraging eglot-managed-mode-hook and
eglot-stay-out-of. This was Eglot's philosophy from the start and
I don't intend to change it.

João




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

Previous Next


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