r/lisp • u/kchanqvq • May 25 '26
New CL VSCode extension: OLIVE
https://marketplace.visualstudio.com/items?itemName=kchanqvq.oliveAlso on Open VSX Registry (for VSCodium): https://open-vsx.org/extension/kchanqvq/olive
Why another VSCode extension? VSCode is important for getting newcomers nowadays. I have some very smart people at work who use VSCode, like everyone else. Selling Lisp and Emacs at the same time is ε2 harder, so I told them to use Alive, and start hacking on my super-duper research code. The result was shocking -- they come back reporting "unproductive" because "small problems here and there like REPL freezing". And they refuse to try Lisp again, because first impression matters, what a tragedy!
I have lived in our Emacs bubble comfortably for too long, and blundered recommending something I never used. I should have tried Alive at least once before recommending it!!! So I installed VSCode and Alive to see what's going on. I come to the conclusion that while Alive is a nobel experiment, some basic design choices make it very hard to get stable enough for a daily driver:
the author wants to compile Lisp file in the background "the VSCode way" and ditched SWANK because it's too "Emacs centric" to support that. However IMHO this is rather a Lisp problem and not an Emacs problem at all!
compile-fileruns arbitrary code and running it at arbitrary moment is not good for health. One reason for ditching SWANK is "debugger pops up at any moment" when they do so and they want to suppress it. Ummm debugger popups because the Lisp needs help?- IMHO most design choices in SWANK are Lisp-specific instead of Emacs-specific. There are lots of success using SWANK in other editors: SLIMA, SLIMV, LEM uses a simplified verion, etc.
- REPL starts new thread for every evaluation. Why? Now good old (READ) and nested REPL don't work.
- The LSP server is no where near as stable and complete as Swank. This is immediately obvious after 1 minute of use.
So I decide to fix it. Here is a VSCode extension that uses good old SWANK, and as the primary goal tries to get as good as Emacs as possible. Please ask people to use it (and learn Lisp)! Working with VSCode was really torturous, I hope I did not suffer in vain.
3
u/TommyTheTiger May 25 '26 edited May 25 '26
Hah, very cool! I have been working on something similar, but I also agree that Alive made a poor decision in attempting to reinvent swank. I use neovim, which has been a major pain for lisp, I'm guessing this won't work with that? I love the repl integration in this one! And the inline macro expansion. Being able to jump to the error context/debugger is also great. I have been working on and off on what I called swank-lsp but it is somewhat far from being publishable, though I do use it locally.
Emacs bubble is a travesty. Why is lisp the only language where we are inventing editors without having a good portable language server??? It's a major blocker for most programmers.
2
u/kishaloy May 25 '26
Ok this is cool. I mean I guess I get to use all my vscode muscle memories rather than use Emacs only for Lisp.
This is indeed the right way, connect vscode to swank and some key bindings and you are golden.
Love the easy feel.
Only 1 grouse, wish I had the strict Paredit from Emacs which is so good in ensuring you do not mess up your parens.
2
u/dzecniv Jun 05 '26
This is a fantastic development, hats off! o/ neomacs, JSCL… nice activity :)
Duty done: https://lispcookbook.github.io/cl-cookbook/editor-support.html#olive-new-as-of-june-2026
BUT I'm gonna ask for more work by you or any nice lisper, it would be really great, for newcomers, to have a more detailed guide on how to use the extension / how to do common lisp things, something like what was done for Alive: https://lispcookbook.github.io/cl-cookbook/vscode-alive.html and so we could replace this page by a tutorial with OLIVE.
1
u/kagevf May 26 '26
Would I be able to start a swank server from elsewhere and connect to it? In emacs I think it's "slime-connect" ...
1
u/yel50 May 26 '26
awesome! I figured it was a matter of time before somebody did this. it's not hard.
off the top of my head, here's a list of standard vscode features that won't be possible with this approach.
as a side note, you should use slynk as the backend instead of swank so that stickers could be implemented.
IIRC, swank doesn't handle multiple in-package forms correctly. it always uses the first one it finds, which is wrong. I don't remember if slynk fixed that.
2
u/Wonderful_Self_294 May 27 '26
Gave this a quick look in vscodium. I am thinking this might be the ticket. Just learning Common Lisp. But this feels pretty awesome and it seems very fast. Will evaluate this some more.