unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: felician.nemeth@gmail.com, emacs-devel@gnu.org
Subject: Re: [GNU ELPA] eglot-x.el: Protocol extensions for Eglot
Date: Fri, 05 May 2023 17:39:22 +0300	[thread overview]
Message-ID: <835y96j10l.fsf@gnu.org> (raw)
In-Reply-To: <87354auafu.fsf@gmail.com> (message from João Távora on Fri, 05 May 2023 15:20:21 +0100)

> From: João Távora <joaotavora@gmail.com>
> Cc: Felician Nemeth <felician.nemeth@gmail.com>,  emacs-devel@gnu.org
> Date: Fri, 05 May 2023 15:20:21 +0100
> 
> > At the very least, eglot.el could benefit from offering a
> > supported mechanism for adding such extensions; there should be no
> > need for using advice for that.
> 
> I agree.  Eglot has an API.  I haven't looked at eglot-x in depth but I
> suspect it's using some of this API in part.  If it's not sufficient,
> then Eglot could enhance it.  What part of eglot-x is using advice, if
> any?
> 
> > João, why would you not consider supporting these extensions as part
> > of eglot.el?
> 
> They're non-standard, each server has its own set of extensions, which
> in some cases could be volatile and become obsolete.  Furthermore, I
> would suspect that if eglot-x.el modifies eglot.el's standard behaviour,
> it is not as well tested across different servers and could provide a
> surprise for users of other servers.

I understand and agree in general, but surely each change should be
judged by itself, and some, maybe many, might not have these
problematic aspects?

> A guiding principle of eglot.el (and indede LSP) is to not have any
> server-specific code.

If "server-specific" behavior is, for example, just some non-standard
capabilities, that doesn't count as "server-specific code" in my book.
After all, a standard-compliant server could very well implement only
a subset of the capabilities documented by the standard.

> So in general, I think having eglot-x.el as a kind of laboratory where
> authors can experiment freely with new LSP-powered UIs is an excellent
> approach.  As these extensions make their way into the official LSP
> protocol Eglot can support them.  For example, I believe "inlay hints"
> started as some kind of rust-specific protocol extension and is now
> well-supported in Eglot for many servers (I use it daily).
> 
> We could consider bundling eglot-x.el with the Eglot ELPA package (I do
> hope Felicián is aware of the ins and outs of :core packages though).
> And I think a separate package isn't really bad either.

But it should not use advice, IMNSHO.



  reply	other threads:[~2023-05-05 14:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 11:56 [GNU ELPA] eglot-x.el: Protocol extensions for Eglot Felician Nemeth
2023-05-05 13:18 ` Ruijie Yu via Emacs development discussions.
2023-05-06 13:14   ` Felician Nemeth
2023-05-05 13:26 ` Eli Zaretskii
2023-05-05 14:20   ` João Távora
2023-05-05 14:39     ` Eli Zaretskii [this message]
2023-05-05 16:41       ` João Távora
2023-05-06 13:12         ` Felician Nemeth
2023-05-06 13:27           ` Eli Zaretskii
2023-05-06 15:17             ` Felician Nemeth
2023-05-06 15:27               ` Eli Zaretskii
2023-05-06 13:51           ` João Távora
2023-05-06 15:28             ` Felician Nemeth
2023-05-05 16:38   ` Philip Kaludercic

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=835y96j10l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=felician.nemeth@gmail.com \
    --cc=joaotavora@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 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).