Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Publish analysis and server to npm #354

Open
luooooob opened this issue Jan 27, 2022 · 8 comments
Open

[Feature] Publish analysis and server to npm #354

luooooob opened this issue Jan 27, 2022 · 8 comments

Comments

@luooooob
Copy link

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?

@amiralies
Copy link
Contributor

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.

@gasacchi
Copy link

gasacchi commented Aug 5, 2022

+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

@zth
Copy link
Collaborator

zth commented Aug 6, 2022

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.

@gasacchi
Copy link

gasacchi commented Aug 6, 2022

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.

@aspeddro
Copy link
Contributor

Any plans for this?

I can work on it.

@cristianoc
Copy link
Collaborator

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

@zth
Copy link
Collaborator

zth commented Dec 15, 2022

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.

@aspeddro
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants