unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Arash Esbati <arash@gnu.org>,  Eli Zaretskii <eliz@gnu.org>,
	 Tim Cross <theophilusx@gmail.com>,
	 emacs-devel <emacs-devel@gnu.org>
Subject: Re: Making `eglot-server-programs' a custom variable?
Date: Thu, 10 Nov 2022 22:10:18 +0000	[thread overview]
Message-ID: <87edua8nqt.fsf@gmail.com> (raw)
In-Reply-To: <jwvcz9uoh1o.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 10 Nov 2022 12:43:09 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Why?  This is in a user's init file.  I can more or less see that
>> argument for inter-library dependencies.  But here, w-e-a-load is
>> exactly what's needed.  I use it all the time in my config.
>
> I have 4 uses of it in my ~75kB init file.

Heh, I have it in almost every one of my ~75-750 small elisp files, each
one more or less dedicated to configuring a package that I may or may
not use for 7500 years.

> That doesn't mean we have to find a way to avoid its use, just that it
> would be nice to find such a way.

I think with-eval-after-load sits nicely at the intersection of lazy
autoloads and user Elisp snippets.  Is there another tool that does
this?  use-package, maybe?  But won't that use the same thing
underneath?  Anyway I tend to prefer things that do one thing well and
don't make me learn new DSLs.  with-eval-after-load hasn't let me down.

> "Choose an LSP server" seems to me like a very poor way to customize the
> behavior of the server.
>
> IOW the design of the LSP protocol is not "Emacs-y" enough :-)

Ah.  Yes.  You're probably right about that, how could you not be ;-) ?
I also think it's more about these servers using different backend
strategies themselves.  Last I looked at the C++ server landscape, all
of them provided more or less the same, but consuming different amount
resources.  There's also lots of forking going on.  I think this is
good.

>>> Maybe to reduce the problem we should allow multiple entries per
>>> major mode and use the first that works, without needing to go through
>>> `eglot-alternatives`?
>>
>> Again, why?  Why add more semantics to an already complicated variable
>> when the functional eglot-alternatives plugin works fine?  Furthermore,
>> I'd like to this particular configuration for a future
>> multiple-simultaneous-server-in-one-mode idea.
>
> I'm just suggesting directions.  I don't claim they're the right answer.
> My impression is that this variable is currently both "too complex" and
> "not flexible enough".  Don't get me wrong, it's good enough for now.
>
> But no, I don't have a good replacement to suggest.  My gut just tells
> me that there is a better arrangement.

It's not a very pretty variable, I admit, but it's good enough for now
and could be a lot worse :-)

I once thought it would be a good idea to have a buffer-local variable
eglot-server-program (singular) that major-modes could set as a stronger
suggestion of what to use.  So a future smc++-mode could be based
entirely on tree-sitter for syntax-highlighting and some good C++ server
for everything else, including some LSP-backed smc++-frob-kittens
command that isn't in eglot.el.  The "good C++ server" would be set in
eglot-server-program, called from smc++-mode.  Maybe that "good server"
would even be bundled with the smc++-mode package so that M-x smc++-mode
would probably start Eglot by default.  Can you ask your gut if this is
an acceptable arrangement?

João



      reply	other threads:[~2022-11-10 22:10 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 20:25 Making `eglot-server-programs' a custom variable? Arash Esbati
2022-11-09 20:49 ` Philip Kaludercic
2022-11-09 22:07   ` Arash Esbati
2022-11-10 17:47     ` Philip Kaludercic
2022-11-10 17:56       ` Stefan Monnier
2022-11-10 18:10         ` Philip Kaludercic
2022-11-10 18:29           ` Stefan Monnier
2022-11-10 19:36             ` Philip Kaludercic
2022-11-12  3:47       ` Jim Porter
2022-11-12  5:16         ` chad
2022-11-12  7:26           ` Philip Kaludercic
2022-11-12  7:34         ` Philip Kaludercic
2022-11-12  7:58         ` Eli Zaretskii
2022-11-12  8:03           ` Philip Kaludercic
2022-11-12  8:25             ` Eli Zaretskii
2022-11-12  8:45               ` Philip Kaludercic
2022-11-12  9:01                 ` Eli Zaretskii
2022-11-12  9:40                   ` Philip Kaludercic
2022-11-12 10:02                     ` Eli Zaretskii
2022-11-12 13:46                       ` Philip Kaludercic
2022-11-12 14:30                         ` Eli Zaretskii
2022-11-13  0:20                           ` Philip Kaludercic
2022-11-13  6:39                             ` Eli Zaretskii
2022-11-13  7:11                               ` Philip Kaludercic
2022-11-13  7:43                                 ` Eli Zaretskii
2022-11-15 17:50                                   ` Philip Kaludercic
2022-11-15 18:15                                     ` Eli Zaretskii
2022-11-16 13:05                                       ` Philip Kaludercic
2022-11-16 13:44                                         ` Eli Zaretskii
2022-11-16 14:12                                           ` Philip Kaludercic
2022-11-16 14:51                                             ` Eli Zaretskii
2022-11-16 17:05                                               ` Philip Kaludercic
2022-11-10  6:36 ` Eli Zaretskii
2022-11-10  7:56   ` Tim Cross
2022-11-10  8:24     ` Eli Zaretskii
2022-11-10  9:34       ` Tim Cross
2022-11-10 11:16         ` Eli Zaretskii
2022-11-10 13:59           ` Tim Cross
2022-11-10  9:18   ` Arash Esbati
2022-11-10  9:34     ` Eli Zaretskii
2022-11-10 10:25       ` João Távora
2022-11-10 17:04         ` Eli Zaretskii
2022-11-10 17:10         ` Eli Zaretskii
2022-11-10 21:45           ` João Távora
2022-11-11  6:12             ` Yuri Khan
2022-11-11  9:09               ` João Távora
2022-11-12  2:34               ` Brian Cully via Emacs development discussions.
2022-11-12 16:22                 ` Michael Albinus
2022-11-11  7:04             ` Eli Zaretskii
2022-11-11  9:12               ` João Távora
2022-11-11 11:53                 ` Eli Zaretskii
2022-11-12 14:44           ` Arash Esbati
2022-11-12 14:49             ` Eli Zaretskii
2022-11-12 14:58               ` Arash Esbati
2022-11-10 21:28     ` Augusto Stoffel
2022-11-11 10:05       ` Arash Esbati
2022-11-11 12:05         ` Eli Zaretskii
2022-11-11 12:22           ` Arash Esbati
2022-11-11 12:33             ` Eli Zaretskii
2022-11-11 13:26               ` Augusto Stoffel
2022-11-11 13:48               ` Arash Esbati
2022-11-11 13:54                 ` Eli Zaretskii
2022-11-10 10:15 ` João Távora
2022-11-10 11:23   ` Eli Zaretskii
2022-11-10 12:07     ` João Távora
2022-11-10 15:19       ` Eli Zaretskii
2022-11-10 15:35         ` Dmitry Gutov
2022-11-10 16:50           ` Eli Zaretskii
2022-11-10 18:22             ` Dmitry Gutov
2022-11-10 18:31               ` Eli Zaretskii
2022-11-10 15:38         ` João Távora
2022-11-10 16:52           ` Eli Zaretskii
2022-11-10 17:08           ` Eli Zaretskii
2022-11-10 21:13             ` João Távora
2022-11-10 13:57   ` Stefan Monnier
2022-11-10 15:21     ` João Távora
2022-11-10 17:43       ` Stefan Monnier
2022-11-10 22:10         ` João Távora [this message]

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=87edua8nqt.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=arash@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=theophilusx@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).