kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

github.dev support :)

Open LifeIsStrange opened this issue 1 year ago • 2 comments

Hi @fwcd thank you for your very useful LSP! See I don't usually use vscode anymore however what more and more people do is: to go on a github repository and press '.' if you have the github option enabled (soon to be default) this open a vscode version of the repository, on your web browser, which make exploring open source libraries/PRs much easier and faster. However your LSP has to be made compatible for it to work :m https://github.dev/fwcd/kotlin-language-server see: https://code.visualstudio.com/docs/editor/vscode-web#_limitations

LifeIsStrange avatar Jul 27 '22 17:07 LifeIsStrange

While syntax highlighting should work, running the language server in the browser unfortunately is not really feasible at the moment, since it heavily depends on the JVM. Even if, hypothetically, we could compile the language server via Kotlin/JS, LSP4J and the Kotlin compiler, two central dependencies, are JVM-only.

fwcd avatar Jul 27 '22 22:07 fwcd

there exists java transpilers to js that are quite production ready, also you could target wasm or even embed a graalVM in wasm, embedded graalvm would bring full support for java/kotlin in the browser out of the box (although not the fastest approach it sounds promising I believe)

I believe a mix of JSweet and KotlinMPP would be doable although it is not obvious to estimate the complexity, sometimes transpiling is surprisingly easy.

And yes bringing at least support for syntax highlighting would be very useful

LifeIsStrange avatar Jul 27 '22 23:07 LifeIsStrange