anmonteiro / lumo

Fast, cross-platform, standalone ClojureScript environment
Eclipse Public License 1.0
1.88k stars 85 forks source link

Using lumo as a foundation for Language Server Protocol #202

Open abhi18av opened 7 years ago

abhi18av commented 7 years ago

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.

daviwil commented 7 years ago

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.

anmonteiro commented 7 years ago

@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.

RickMoynihan commented 6 years ago

@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?