all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: 61679@debbugs.gnu.org
Subject: bug#61679: 29.0.60; Eglot: staying out of trouble
Date: Tue, 21 Feb 2023 15:00:47 +0000	[thread overview]
Message-ID: <CALDnm53XzZhe4SkP=wtmCrM9ng+hC_wQfKf+VismpKwdfq2iWg@mail.gmail.com> (raw)
In-Reply-To: <87mt57f5tw.fsf@gmail.com>

On Tue, Feb 21, 2023 at 2:32 PM Augusto Stoffel <arstoffel@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@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





  reply	other threads:[~2023-02-21 15:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 14:31 bug#61679: 29.0.60; Eglot: staying out of trouble Augusto Stoffel
2023-02-21 15:00 ` João Távora [this message]
2023-02-21 15:09   ` Augusto Stoffel
2023-02-21 15:17     ` João Távora
2023-02-21 15:32       ` Augusto Stoffel
2023-02-21 15:53         ` João Távora
2023-02-21 15:53           ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm53XzZhe4SkP=wtmCrM9ng+hC_wQfKf+VismpKwdfq2iWg@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=61679@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.