GNU bug report logs - #64159
Feature suggestion for eglot: preferred LSP servers

Previous Next

Package: emacs;

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

Date: Sun, 18 Jun 2023 21:12:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 64159 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#64159; Package emacs. (Sun, 18 Jun 2023 21:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to João Távora <joaotavora <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 18 Jun 2023 21:12:02 GMT) Full text and rfc822 format available.

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

From: João Távora <joaotavora <at> gmail.com>
To: Jeremy Bryant <jb <at> jeremybryant.net>
Cc: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Re: Feature suggestion for eglot: preferred LSP servers
Date: Sun, 18 Jun 2023 22:13:43 +0100
On Sun, Jun 18, 2023 at 5:16 PM Jeremy Bryant <jb <at> jeremybryant.net> wrote:
>
>
> (Expanding an initial discussion with Joao to the proper email list)
>
> Hi,
>
> The variable eglot-server-programs includes suitable LSP servers per
> major mode.  Would it be useful for users to extend this to a preference by order?
>
> For example, for example eglot has 2 supported programs for TeX:
>                                 ((tex-mode context-mode texinfo-mode bibtex-mode)
>                                   . ,(eglot-alternatives '("digestif" "texlab")))
>
> Is one preferred in terms of compatibility with eglot or other
> functionality?  This could be implemented with a specific order.

Just a preamble: Eglot is an LSP client.  The (great) idea behind
LSP is for every client to be compatible with every server.  That's
not always  respected by client/server implementers (the most common
case is servers who assume that VSCode, made by the company who also
makes the standard, is the de facto standard).  But in most cases
it _is_ respected is, and certainly Eglot as a Client strives to
achieve that.

So, in my view, it makes little sense to talk about "servers supported
or compatible with eglot" .  Even eglot-server-programs itself is a bit
of an anti-LSP thing, though admittedly it's a very useful one in some
cases.  It's just a list of server invocations that Emacs can guess
for the current major mode.   I almost always start my daily clangd
sessions with C-u M-x eglot, for example, and then pass one or other command
line argument to the prompt, referring to history.  I do this once
or twice a day at most, and barely lose any time.  So eglot-server-programs
is almost useless to me.  I try experimental servers all the time, and
point Eglot to it with the same method.

So the order of the alternatives isn't really important, or thought
over.  At least by me it isn't.

Hope this helps,

João (with a tilde on the a for a nice round nasal ão)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64159; Package emacs. (Sun, 18 Jun 2023 22:26:02 GMT) Full text and rfc822 format available.

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

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 64159 <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#64159: Feature suggestion for eglot: preferred LSP servers
Date: Sun, 18 Jun 2023 23:20:06 +0100
Thanks João for the clarifications on the purpose of eglot, and the suggestion to use C-u M-x
eglot, I will investigate.

My feature suggestion was from a more basic user-level selection of LSP
servers.


PS: In the meantime, I have worked out how to use C-x 8 to insert Unicode for proper name
spelling of João, thank you for clarification.


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

> On Sun, Jun 18, 2023 at 5:16 PM Jeremy Bryant <jb <at> jeremybryant.net> wrote:
>>
>>
>> (Expanding an initial discussion with Joao to the proper email list)
>>
>> Hi,
>>
>> The variable eglot-server-programs includes suitable LSP servers per
>> major mode.  Would it be useful for users to extend this to a preference by order?
>>
>> For example, for example eglot has 2 supported programs for TeX:
>>                                 ((tex-mode context-mode texinfo-mode bibtex-mode)
>>                                   . ,(eglot-alternatives '("digestif" "texlab")))
>>
>> Is one preferred in terms of compatibility with eglot or other
>> functionality?  This could be implemented with a specific order.
>
> Just a preamble: Eglot is an LSP client.  The (great) idea behind
> LSP is for every client to be compatible with every server.  That's
> not always  respected by client/server implementers (the most common
> case is servers who assume that VSCode, made by the company who also
> makes the standard, is the de facto standard).  But in most cases
> it _is_ respected is, and certainly Eglot as a Client strives to
> achieve that.
>
> So, in my view, it makes little sense to talk about "servers supported
> or compatible with eglot" .  Even eglot-server-programs itself is a bit
> of an anti-LSP thing, though admittedly it's a very useful one in some
> cases.  It's just a list of server invocations that Emacs can guess
> for the current major mode.   I almost always start my daily clangd
> sessions with C-u M-x eglot, for example, and then pass one or other command
> line argument to the prompt, referring to history.  I do this once
> or twice a day at most, and barely lose any time.  So eglot-server-programs
> is almost useless to me.  I try experimental servers all the time, and
> point Eglot to it with the same method.
>
> So the order of the alternatives isn't really important, or thought
> over.  At least by me it isn't.
>
> Hope this helps,
>
> João (with a tilde on the a for a nice round nasal ão)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#64159; Package emacs. (Sun, 18 Jun 2023 22:26:02 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 04 Sep 2023 08:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 287 days ago.

Previous Next


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