From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Elisp LSP Server Date: Thu, 14 Oct 2021 09:20:07 +0100 Message-ID: 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: multipart/alternative; boundary="000000000000e424fc05ce4bbfb3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19169"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joost Kremers , Tim Cross , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 14 10:21:59 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 1mavzz-0004dE-Gj for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 10:21:59 +0200 Original-Received: from localhost ([::1]:43990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mavzx-0004Ir-Us for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 04:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mavyS-0002mP-NM for emacs-devel@gnu.org; Thu, 14 Oct 2021 04:20:24 -0400 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:42886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mavyR-0004wI-0z for emacs-devel@gnu.org; Thu, 14 Oct 2021 04:20:24 -0400 Original-Received: by mail-pf1-x430.google.com with SMTP id m14so4775255pfc.9 for ; Thu, 14 Oct 2021 01:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ur3QOmC4F+tVKU3lNJ07pKWT1MlwcmwvR3p9g2g1zsA=; b=nAkubBjhhAjXc+pT06CdFrot3Tmk4VnF+CWU38IK04lE/mZTaR0XocYCNuZ3GFX83m 2SVlcMk/zE0JDM3LibcB8xjcPGYE6SKaHn3CJd6YeoYzUXaE4sBO3s2pmQe452FDg/FK nKKpvHeDBzAb+hlmzPcw9wTFPXyNKCXra544fMfsWFvU3kyrRC8lbiyYeQ7QVWPvg9Kw 6Xj+H+wPzhIakFoGMcd51q5XTQhZgCFt6euTgYm7YBCn/heaV8IL2Of8hnHDIWGiNMY+ 52l3orsMtF8IyXxWaJ2gbqBG/XDW8VtS4zwFDxpahAc5a4W+KQW1H565cB8cuhjLV67h /+Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ur3QOmC4F+tVKU3lNJ07pKWT1MlwcmwvR3p9g2g1zsA=; b=O0UAaqlk3bV9ROL8WfW27WDWOyglXUJmI9mbsvAIDHOYI0vYdmzYsFOiVLOJvTx3s+ HcfxZ7Q+jledGRY3oMtyflK2VfCVyPDtpBt3ygW7QEWyMzH3Fdrw9lct1cvr1FKQBkgD p9byS6IbS2M3aL8RQ6rwHg1ZK1LBKuIE2HesHxHRMYtmrHe+qrXXIenQA2h72oEtCkhN woHb8e/4k6gCmafec4mx8IVayfuixX223M6JH6qgVg0+1cM9yA5V/Y16rsrseKl0sVKE LO47nTAP0xwBGeECRP65kx1Q5ZmxCVprUM70VzbMFsNtfbqQUrscbQRgICXicpxEEOTs Bmqg== X-Gm-Message-State: AOAM530GJwJ7j/eJATKeOOZcJgvMGHoeMOpEH/2dz+T1nQk8vHHweAem bAo0MkXkjacNLixx9/slB+icflvTm4p0z2R0z+0= X-Google-Smtp-Source: ABdhPJykp6+AU0ik/ADHWWEnTB6zgBzXDq+1XoApI30dCUz1woEwoK4GAQWi9kh0tPqYSqE/oiWr1w3rHxajR149tNE= X-Received: by 2002:a05:6a00:c1:b0:44c:ec40:b47 with SMTP id e1-20020a056a0000c100b0044cec400b47mr4103243pfj.76.1634199620821; Thu, 14 Oct 2021 01:20:20 -0700 (PDT) In-Reply-To: <839638db-98e1-4669-1b7e-82c8e26ec4aa@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=joaotavora@gmail.com; helo=mail-pf1-x430.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, HTML_MESSAGE=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:276975 Archived-At: --000000000000e424fc05ce4bbfb3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Oct 13, 2021, 18:34 Dmitry Gutov wrote: > 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 cod= e > 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= . > Not only practical, but also the right one, IMHO The use of jsonrpc.el, an existing Emacs library for JSONRPC communication, as well as parts of the Eglot LSP client (also slated to be in Emacs core) can more than likely help when doing this. Even though Eglot is a LSP client, a very significant part of its code could be used in the server. If there is serious interest in making a eglot-servel.el, I can arrange the split of eglot.el into eglot-common.el and eglot-client.el libraries. Jo=C3=A3o > > --000000000000e424fc05ce4bbfb3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Oct 13, 2021, 18:34 Dmitry Gutov <dgutov@yandex.ru> wrote:
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 implemen= ting
>> 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.<= br>

N= ot only practical, but also the right one, IMHO=C2=A0

The use of jsonrpc.el, an existing Emacs libr= ary for JSONRPC communication, as well as parts of the Eglot LSP client (al= so slated to be in Emacs core) can more than likely help when doing this.= =C2=A0

Even though Eglot= is a LSP client, a very significant part of its code could be used in the = server.=C2=A0

If there i= s serious interest in making a eglot-servel.el, I can arrange the split of = eglot.el into eglot-common.el and eglot-client.el libraries.

Jo=C3=A3o

--000000000000e424fc05ce4bbfb3--