emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp LSP Server


From: Tim Cross
Subject: Re: Elisp LSP Server
Date: Thu, 14 Oct 2021 07:00:25 +1100
User-agent: mu4e 1.7.0; emacs 28.0.60

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 13.10.2021 20:15, Joost Kremers wrote:
>>> - No idea what language to use or how to implement the server. It has
>>> been suggested elisp would be the obvious choice, but I don't see how
>>> you can implement elisp outside Emacs without pretty much implementing
>>> most of emacs.
>> Why not just use Emacs? Run an Emacs daemon process (properly isolated, so it
>> doesn't interfere with the user's Emacs process), feed it the Elisp code and
>> have it return the analytics that LSP requires. That doesn't sound too 
>> difficult.
>
> That seems like the only practical way to implement such a server, indeed.

The main objective put forward by the OP was to make it so that working
with Elisp was the same as working with other languages supported by LSP
- at least that was the core message I read from the OP. The ability of
non-Emacs editors to also have this access was secondary.

IFF this is the case, having to start a whole second Emacs instance as a
daemon, just to edit elisp with emacs seems like a significant resource
sink with no real benefit other than adding additional failure points.

One of the points the OP mentioned was inconsistency in programmer
experience - having one interface when editing other LSP supported
languages and another when editing elisp. My point is that you can
eliminate most of that difference with a little work on key bindings and
possibly some interface changes. It doesn't have to be an LSP language
server provided it feels like one to the user.

The use for an elisp language server for non-Emacs editors seems like a
very very small use case to me. Even the proposed use case of being able
to edit a broken init.el file with a different editor seems unlikely. In
fact, I doubt very much elisp is of any interest to anyone who isn't an
Emacs user and emacs -Q is probably still more convenient than using a
completely different editor to edit your init.el file. 

I doubt very mush that anyone will ever bother to implement an LSP
language server for elisp. There simply isn't sufficient benefit given
the work required. Even less likely for non-Emacs users if to have an
elisp LSP language server you need to install Emacs to provide the
daemon, which will be slow to start and resource hungry compared to
other LSP language servers. I think it also largely misses the point -
the idea of LSP is to provide a small, fast and easy to install basic
service which can assist an editor to provide intelligent completion,
linting, syntax highlighting etc for a language. All of the other LSP
language servers I've used are small, fast to start and easy to install.
Emacs as a daemon is none of these.

At any rate, I only entered this thread to address the misinformation
about LSP being evil and encouraging the use of non-free software. LSP
is simply a protocol - how it is implemented and how it is used is down
to developers and users - arguing that providing an LSP server would
encourage the use of non-free software is extremely unlikely. Elisp is
of no interest to non-Emacs users and while it might seem that elisp is
the greatest language ever to those who have drunk the Emacs kool-aid,
to those outside Emacs, it is just some esoteric editor configuration
language of little interest. 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]