From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Elisp LSP Server Date: Thu, 14 Oct 2021 07:00:25 +1100 Message-ID: <87ee8obqyy.fsf@gmail.com> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <87ee99dv34.fsf@gmail.com> <07cf50ddddb5a9556aa94201a7ac88c9@webmail.orcon.net.nz> <87fstf3god.fsf@fastmail.fm> <87ily2947q.fsf@yahoo.com> <87fst5ae2t.fsf@gmail.com> <87v920j0jx.fsf@fastmail.fm> <839638db-98e1-4669-1b7e-82c8e26ec4aa@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7548"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.0; emacs 28.0.60 Cc: Joost Kremers , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 13 22:39:18 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mal1y-0001kv-B4 for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Oct 2021 22:39:18 +0200 Original-Received: from localhost ([::1]:50218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mal1w-0005eo-BF for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Oct 2021 16:39:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mal13-0004xY-Qb for emacs-devel@gnu.org; Wed, 13 Oct 2021 16:38:24 -0400 Original-Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:33427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mal12-0002iQ-6T for emacs-devel@gnu.org; Wed, 13 Oct 2021 16:38:21 -0400 Original-Received: by mail-pg1-x531.google.com with SMTP id a73so3496517pge.0 for ; Wed, 13 Oct 2021 13:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=8xkLrlQQn6WHVEiY2co1HqGrutYJ7ex5OQlflqh29ow=; b=q3QCztHCkIPxKJqWjRS+l0QoIrEdeTBBCsmEFsGHjpWpeAbiUy/9Q7x4SrvVI/npzn aVQA14C+jiDWfa4RGX3/vBtoYcPipQpYNLzDerBUmR3ar/KbJMqRU5/Ni5IN+gbcnzTr L5pjRKVw4CGJ8aFWcJ6BxhAOcD2qiKzFfKBKhoFecs8PDo68TiYzkVtq4mqOIvIDXf+0 kdC78SMhz26taZLHQg62wJamCXAzVr/inPd5+ELy+WBLfV739tlEeT1Ts4c3lk9/zFCy P7Zrza6IiD+tfOAAnnLeaEAdlfqkBMYGkgCqpLvkvLRhC3sAppAtBRzudcD3Ndhi0peI SC7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=8xkLrlQQn6WHVEiY2co1HqGrutYJ7ex5OQlflqh29ow=; b=svo0OuEOyPvXNuI4sxk3V5KmZ5UijDvh3nf9AxEJqTaIaO48o5RhiCSNndBvZiSnUK qZAAho5CII6hHWaQRpY4+Dlgz90RtWUVh9KwLOjEf12VkGCBHZ9Q1TLqK8snp9bBLdSs ULBGUhn2GJZ9ZHL/FzEefWtL5Fvnd6E68M6DrmH5z+jqF4ZVMYO2bDrXYEvoAYmhBtez p409oK9Eo1fHvpmJqmTO0iWViU9GZestNYNdk36rtS/w0WC461MQeN3wUKeM8GIS2B3t jYuDXm9i1jdhMVX6wKjemb9EI1iBZwzWHy1iTJ16em5cEXv9bBRWTmqeQGryZoTx2I/+ SlBQ== X-Gm-Message-State: AOAM532cBHlrhIYaTqppI3KTxJ3AOQ1WhgWY10JYSnfV5rch4OSmqkVY wdFOPwPjFjnTwNMMt0zzO61LtHBTJIA= X-Google-Smtp-Source: ABdhPJyanGasrSP1yZRQTxhvwNDu06UQX8iSmSIlkBMzGc9CIMS+2hlDFJdv6ZXgJcwPn3RrA3YNnA== X-Received: by 2002:a63:7045:: with SMTP id a5mr1104773pgn.404.1634157497904; Wed, 13 Oct 2021 13:38:17 -0700 (PDT) Original-Received: from tim-desktop (124-171-52-11.dyn.iinet.net.au. [124.171.52.11]) by smtp.gmail.com with ESMTPSA id d2sm6817839pjg.35.2021.10.13.13.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 13:38:17 -0700 (PDT) In-reply-to: <839638db-98e1-4669-1b7e-82c8e26ec4aa@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276934 Archived-At: Dmitry Gutov 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.