lumo icon indicating copy to clipboard operation
lumo copied to clipboard

Using lumo as a foundation for Language Server Protocol

Open abhi18av opened this issue 7 years ago • 3 comments

Hi @anmonteiro ,

I'd like to suggest that since with lumo we already have an awesome independent story for ClojureScript with the ability to use any NodeJS package, perhaps lumo can be used as a base for a Language Server Protocol .

This will enable the futher development of the Clojure(Script) repls in modern Electron based text editors, VsCode and Atom.

I read your blog post about future of Lumo and I thought that this is a great goal for Lumo, to enable further adoption of ClojureScript and reaching out to less imposing code editors.

abhi18av avatar Jul 04 '17 15:07 abhi18av

Provided that it's easy to interface with code in npm packages, the vscode-languageserver package would make this easy to do (more info on GitHub). I've started looking into how to use it from ClojureScript/Lumo but it's been a while since I've used Clojure so I'm having to refresh my memory a bit :)

I think it should be possible to launch the Lumo REPL inside of VS Code's Integrated Terminal and host a language server inside of it for fully interactive development. I do something similar in the PowerShell extension.

daviwil avatar Jul 06 '17 14:07 daviwil

@daviwil Well Lumo is nothing but a custom ClojureScript init script on top of Node, so NPM dependencies are supported by default. In this comment I explain how to include NPM dependencies in Lumo. Spoiler: npm install left-pad and (js/require "left-pad") in Lumo.

anmonteiro avatar Jul 06 '17 23:07 anmonteiro

@anmonteiro: Would it make sense to include the examples on how to include/require npm packages in the README, or in the docs somewhere else?

RickMoynihan avatar Dec 21 '17 11:12 RickMoynihan