From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: alex sassmannshausen Newsgroups: gmane.lisp.guile.user Subject: Re: LSP Server for Scheme (and more ...) Date: Sat, 11 Jun 2022 07:21:11 +0200 Message-ID: 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="13582"; mail-complaints-to="usenet@ciao.gmane.io" Cc: r.herdt@posteo.de, guile-user To: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jun 11 07:22:01 2022 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 1nztZR-0003HJ-2k for guile-user@m.gmane-mx.org; Sat, 11 Jun 2022 07:22:01 +0200 Original-Received: from localhost ([::1]:49658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nztZP-0000Bl-LC for guile-user@m.gmane-mx.org; Sat, 11 Jun 2022 01:21:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nztYv-0000Bb-JZ for guile-user@gnu.org; Sat, 11 Jun 2022 01:21:30 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nztYt-0005NE-K5 for guile-user@gnu.org; Sat, 11 Jun 2022 01:21:29 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id x17so930864wrg.6 for ; Fri, 10 Jun 2022 22:21:26 -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=PZ7enQJmw/XhSviSpo3+e2IprkLAbDPSPUXPLJGQalE=; b=n0btSZI55Sl5rCq8horAC6FAN+1V9JoZo+NqzwguOXu1lwRceqlA5IxqnE7nZ1m4Hf A3aEe9Sac7ga/nuJi3AsTYjg14tAk1EG5MTKqpOGFGr8Th4YBT7u0tSCBBnO3032cX3t rK0TmIRQb+utkZjXa6t9tkzg1rv2YsdIxiGE5tbImqDHQ0kyRPHexaeVQauYdm14QJuw hanImOHgPLT2n7f0N9pPamcmPWEPhjzvTi72aAwMWI4BJjyzWvelT0a1h78Q96MvE8cX RNK9IWRnDs5LUSeJvybkv39x0iX2O0sV02tVg0zKcebPH8jOQzPcpkjTuo+wRAMLw8sD 5osQ== 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=PZ7enQJmw/XhSviSpo3+e2IprkLAbDPSPUXPLJGQalE=; b=0jbAe2BovWGJnuHKTgJ/U7f6JbGhzNpSAAMBCXXwp8tc0NshmhZ+63SHfhhXEtXvKD DpaR06sOTbBUDKEJ6bHGV4N9S6Mwfrr2CSO+435K4aP2mGglA5GRRnIFtJ6QnPHkSaBD Wm+lLvb+p15NdqZF6M+e81xmGh3F3rNPba/Vr+vdGH6bKS4MQr/ESS9gHcUxeVxdpgIj D4WDtaVOi7pczhLl8IMGWKnZfnOVCLqijCK4hC9pHvBGS3pyMkqWJOIZSTZYKBBXEAQk hT0CW5WmjJnOofDJz4KFkdd6ZOnxVYNLRZF9Sr69Ed3L1DU7PyDLhRVhYibmd/X7tfCF y+6w== X-Gm-Message-State: AOAM530dZF9Hn+f9SuYF8oEiAZTOASTlg8sSFQ3Ir6NrZ7QLI3h9q0jr UMvrV6jsH2/QKrvY4cKqrpag0e4bEGuxIoKxcp0= X-Google-Smtp-Source: ABdhPJzdzOwge878ZA9vKzjJ4yN/Bf8wNfoe3rCQfqDqiut7so2I9vBdzZt6CeimTKe0+mQ1aKHJerqosERvdttzmm4= X-Received: by 2002:a5d:58e5:0:b0:219:e32d:cbd0 with SMTP id f5-20020a5d58e5000000b00219e32dcbd0mr8601325wrd.28.1654924885079; Fri, 10 Jun 2022 22:21:25 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.sassmannshausen@gmail.com; helo=mail-wr1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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" Xref: news.gmane.io gmane.lisp.guile.user:18300 Archived-At: +1 On Sat, 11 Jun 2022, 04:07 Aleix Conchillo Flaqu=C3=A9, wrote: > 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: > > > 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, fetc= h > > signature, fetch documentation and jump to definition. > > > > Repo: https://codeberg.org/rgherdt/scheme-lsp-server > > > > 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 > > > > 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 Guil= e > > 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 > > > > 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 fre= e > > to contact me. It is not documented nor published yet, but already work= s > > for the functionality mentioned (there are a couple of command to launc= h > > 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 > > > > > > >