rescript-vscode icon indicating copy to clipboard operation
rescript-vscode copied to clipboard

[Feature] Publish analysis and server to npm

Open luooooob opened this issue 3 years ago • 8 comments

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?

luooooob avatar Jan 27 '22 07:01 luooooob

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.

amiralies avatar Jan 27 '22 15:01 amiralies

+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

gasacchi avatar Aug 05 '22 12:08 gasacchi

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.

zth avatar Aug 06 '22 05:08 zth

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.

gasacchi avatar Aug 06 '22 14:08 gasacchi

Any plans for this?

I can work on it.

aspeddro avatar Dec 15 '22 00:12 aspeddro

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

cristianoc avatar Dec 15 '22 07:12 cristianoc

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.

zth avatar Dec 15 '22 08:12 zth

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.

aspeddro avatar Dec 15 '22 23:12 aspeddro