nobody-famous / alive

Common Lisp Extension for VSCode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

differences with the cl cookbook

louisabraham opened this issue · comments

Hi, just getting started on my lisp journey.

I discovered Alive thanks to https://lispcookbook.github.io/cl-cookbook/vscode-alive.html

I was able to install Alive and use the REPL.

However, some features are missing compared to what is described in the cookbook.

For example, macro expansion, function disassembly or creating a skeleton don't appear in the command palette.

Do you have any idea why?

I'm using mac OS with roswell.

Oh, right. The cookbook was written before I decided to switch the backend from swank to LSP and not everything has been reimplemented, yet. If you pin the extension to one of the 0.2.x versions, it'll match the cookbook.

I plan on doing macro expansion next when I have time. For function disassembly, there's an inspect link at the bottom of the hover text if you hover over the name of the function. The disassembly is shown as the value in the inspector.

Ok thanks! Which LSP are you using? I thought swank was kinda the reference but I'm super new to LISP.

Also, wow would you replicate remote debugging with your LSP? https://lispcookbook.github.io/cl-cookbook/debugging.html#remote-debugging

I wrote my own LSP server, https://github.com/nobody-famous/alive-lsp

Swank is what Emacs uses. It's basically the same as LSP except that it uses a lisp rpc instead of JSON. I was having too many problems with it, so wanted to try writing my own from scratch and see what happens. I haven't run into any of the issues I was having with swank, so have no reason to go back to it.

I see, that's awesome! I guess remote debugging shouldn't be too hard then: having instructions in to start the LSP on a given port and adding the ability to connect Alive to some port and address.

Macro expansion and remote editing should be there now. I haven't put the skeleton code back in, yet. Getting there... :-)

I'm bumping this instead of creating a new issue as this was open already.

I heavily use swank in my own setup for a project. The server is always running and when I want to check on things or modify things I connect via slime in emacs to the swank port, make my changes and close the connection without killing the server.

How can one replicate this with alive in vscode? Would it be enough if I load the alive-lsp on the server in the same lisp image and forward the port?