rescript-vscode
rescript-vscode copied to clipboard
[Feature] Publish analysis and server to npm
Are the analysis and server in vim-rescript copied and pasted from this project?
I think the "/analysis" and "/server" should be put in a "rescript-lsp-server" repository (or use monorepo ?) and published to npm, like ocaml-lsp-server. It would be easier for people to develop plugins for more IDEs that support lsp
Do you have such a plan?
I think we are still not sure about this. lsp and analysis binary are implementation details for both vscode and vim extensions. But I'm +1 for this. if we release an standalone language server we can have better support for other editors.
+1 for this, is hard to install rescript language server when i want to use rescript in another machine, since i don't use (neo)vim / vscode & i use helix editor daily
Is the hard part that it's hard to access the lsp server and related binaries? If so, is it sure that an npm package would help with that, and would it help for all of the editors we want to support.
We build a vsix for VSCode for each release, and I'm pretty sure that's just a regular zip in disguise. I imagine downloading the latest vsix, unzipping and moving the server in place would be something that could be tried today as an experiment of whether it's doable, rather than publish a separate package.
yes accessing lsp server and related binaries each time when changing machine that doesn't have it mean setting up $PATH or changing editor configuration file (in this case Helix) over again. npm package definitely help.
Any plans for this?
I can work on it.
@zth any thoughts? Somehow related, people have reported about using the analysis in CI. That requires at least exposing the analysis binary (from which reanalyze is accessible as one of the commands).
I think it's a good idea, especially now that reanalyze lives in it too. But I think we need to think carefully about what parts of it we communicate is stable in it, to set the expectations right. So we don't end up in a situation where we can't make the changes we'd like without risking breaking things in an unexpected way.
I think analysis should not be exposed. We should publish just one binary node to start the server, like rescriptlsp. In this case, the LSP is no longer an implementation detail.