From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christine Lemmer-Webber Newsgroups: gmane.lisp.guile.user Subject: Re: LSP Server for Scheme (and more ...) Date: Wed, 27 Sep 2023 15:27:24 -0400 Message-ID: <87a5t7v2jy.fsf@dustycloud.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23343"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.5; emacs 28.2 Cc: guile-user@gnu.org To: "Ricardo G. Herdt" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Sep 27 21:29:25 2023 Return-path: Envelope-to: guile-user@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 1qlaDr-0005na-6G for guile-user@m.gmane-mx.org; Wed, 27 Sep 2023 21:29:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlaDH-0007Do-J0; Wed, 27 Sep 2023 15:28:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlaCu-0006qm-DR for guile-user@gnu.org; Wed, 27 Sep 2023 15:28:24 -0400 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlaCs-0005Ul-2R for guile-user@gnu.org; Wed, 27 Sep 2023 15:28:24 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id BA7CF3200A45; Wed, 27 Sep 2023 15:28:19 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 27 Sep 2023 15:28:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dustycloud.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm2; t=1695842899; x=1695929299; bh=YpV/cUz/lviLIoyl3gaGZNu9T E5VQhM5DU+LVzrQRk8=; b=bItX2HNznFgB1YrR/vrxv/rrvLs3ch9wVoS8n5Har eFM/1CGGGYaqI9VdkIaXAJ0t486PfYdJ9+dQpSgNrDAOncgjHUYRZ14vP6TK3pKA IOaLYylOUno0HXxuLjWunv0UDt62YPLV3xSPAbLFtRI2w2p3oaBs5NgkYjkvJlEX lJJTSKHUq1K6qkL1YV5QsmWVqFIgCQbVqDzZLW5ANIuCuf+eje/EjRs+0LgbqTPa PjAAJ876J3JXPfZSWcm8GbudCqy16rFeHTJRKEE1PhFWmStrovS2+vNCLI5A1E66 29ShA5kTUlwro2X+F7LlMAu0LjtIsnRkg0/8AHRF756nQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1695842899; x=1695929299; bh=YpV/cUz/lviLIoyl3gaGZNu9TE5VQhM5DU+ LVzrQRk8=; b=msALe0YEdAhgO05sIqerdTpymLnUQr0ceZlFmUHaLN6ntGzRVQP Tc1HebuW3QdTvgMbr4ZpoPgh0xLmtzfNI+6AyqzY1DZ4oHR0MO10+qUyYAQ4bXMh kx4WA4nnUPf2bzWXhRHwxFHPU7nEdDWkgUOVJGyE8p990QRONtS+w3MsWp1pdcuj kse0spmu/7byAG9pbHobBJHluMzz+yz+AIbKuH7eC78PY58TIQcGttkTYW78EJL8 iNqczxdznXMaVJ8zUtsYiBpWiovFqfsCIQRcVHgMpcMvmeqVzQ+ul64g9dM3w24U OqlNnkjYhRqPI6jF/msFSctE8bALQeQwBoA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtdeggdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvfevufffjgfkgggtgfesthhqredttderjeenucfhrhhomhepvehhrhhi shhtihhnvgcunfgvmhhmvghrqdghvggssggvrhcuoegtfigvsggsvghrseguuhhsthihtg hlohhuugdrohhrgheqnecuggftrfgrthhtvghrnhepveegvdefuefgffffkefhgffhvdei ueeuueejudduhfejhfekkeehtdetheekfefhnecuffhomhgrihhnpegtohguvggsvghrgh drohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pegtfigvsggsvghrseguuhhsthihtghlohhuugdrohhrgh X-ME-Proxy: Feedback-ID: i006446df:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 27 Sep 2023 15:28:18 -0400 (EDT) In-reply-to: Received-SPF: pass client-ip=64.147.123.25; envelope-from=cwebber@dustycloud.org; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19196 Archived-At: I thought I'd re-highlight this thread, given the thread I just greated and the one on guix-devel. :) "Ricardo G. Herdt" writes: > Thank you all, that's exactly my motivation :) If someone wants to add > support to a different editor/IDE, feel free to ask for help or share > your ideas with me. > > Regards, > > Ricardo > > Am 11.06.2022 04:07 schrieb Aleix Conchillo Flaqu=C3=A9: >> Yes!!! This is amazing and things like this can expose Guile to many >> more people. Even though I've been using Emacs for many years, I >> believe it's not great for newcomers to hear "if you want a good Guile >> environment you can only use Emacs". >> Congratulations again, this was such an important missing piece! >> Best, >> Aleix >> On Fri, Jun 10, 2022 at 3:05 PM wrote: >>=20 >>> Hi Guilers! >>> I want to share a couple of things I have being working on that you >>> may >>> find useful. >>> 1) I developed an LSP Server for Scheme. For those that don't know >>> the >>> Language Server Protocol (LSP), it is meant for adding programming >>> language support for IDEs and editors that implement the protocol >>> (nowadays most of them support it). >>> For now I am focusing on Guile 3 and CHICKEN 5. The idea is to >>> write as >>> much R7RS for common code as possible (like representing documents, >>> fetching word under cursor etc.) and leave implementation specific >>> code >>> to dedicated files. So far I managed to implement auto-completion, >>> fetch >>> signature, fetch documentation and jump to definition. >>> Repo: https://codeberg.org/rgherdt/scheme-lsp-server [1] >>> 2) An LSP server without a client is quite useless, so I'm also >>> sharing >>> an emacs-lsp client: >>> Repo: https://codeberg.org/rgherdt/emacs-lsp-scheme [2] >>> I will create a PR to melpa for this. Until it is merged, you can >>> clone >>> the repo somewhere, 'load' it and follow the instructions in the >>> README >>> to activate it. >>> Usage is based on interaction with the REPL, which is based on >>> Emacs's >>> built-in scheme inferior-mode. So you have to load the file (say by >>> typing C-c C-l on a buffer) in order to get access to symbols >>> imported >>> from other modules. >>> Note: for daily use you probably should stick to Geiser, since its >>> Guile >>> support is obviously much more mature. It can still become useful >>> for >>> other Schemes though, and is a good way to develop the LSP server >>> without leaving Emacs ;) >>> 3) The whole idea behind LSP is to improve language support across >>> multiple IDEs/editors. So I started a proof of concept in VS Code: >>> https://codeberg.org/rgherdt/vscode-scheme-lsp [3] >>> Since I don't use VS Code, I don't expect spending much time on it. >>> I >>> also don't know how a lispy LSP client should/could look like in VS >>> Code. If you have ideas, or want to contribute/take over this, feel >>> free >>> to contact me. It is not documented nor published yet, but already >>> works >>> for the functionality mentioned (there are a couple of command to >>> launch >>> a REPL and load files on it). I will investigate how to automate >>> installation of the LSP server before publishing it and let you >>> know. >>> Everything is on an early stage of development, and APIs may >>> change. I >>> tested it using following software: >>> - Guile 3.0.8 >>> - Emacs 27.1 and 28.1 >>> - Debian Bullseye and Ubuntu 18.04 >>> Any questions, suggestions, critics and contributions are more than >>> welcome. We can also reach me on @libera's #guile, #chicken, >>> #scheme >>> channels by the name rgherdt. >>> Have a nice weekend you all! >>> Ricardo >> Links: >> ------ >> [1] https://codeberg.org/rgherdt/scheme-lsp-server >> [2] https://codeberg.org/rgherdt/emacs-lsp-scheme >> [3] https://codeberg.org/rgherdt/vscode-scheme-lsp