usethesource / rascal-language-servers

An LSP server for Rascal which includes an easy-to-use LSP generator for languages implemented in Rascal, and an interactive terminal REPL.
BSD 2-Clause "Simplified" License
15 stars 8 forks source link

Export dedicated language parametric client instance #94

Open DavyLandman opened 2 years ago

DavyLandman commented 2 years ago

Currently all DSLs are connected to the Language Parametric LSP server. This multiplexer works really nice during development.

When deploying a DSL in it's own VS Code extension, there are a few small problems:

My proposal:

  1. also export a function that builds a new LanguageClient (that internally constructs the right jvm for the right jar)
  2. DSL authors can then write their own extension (we could build a small scaffolding script for it)
  3. DSL extension gets a new dedicated LanguageClient and sends one (or more) registerLanguage call to it.
DavyLandman commented 2 years ago

We might have to extract the file system registration into a seperate jvm process.

jurgenvinju commented 2 years ago

We might have to extract the file system registration into a separate jvm process.

that was the plan anyway, so that's ok.

About the other feature, it sounds like a good plan. I think we need to add more tests before doing this. This is yet another way to use the parametrized LSP and this way will even be tested less than our current implementation since it is only truly useful after deployment. So I propose we invest in testing the parametric LSP with feature-tests before we start adding this new mode of using it, and also think of a way to test this new way of connecting.

BTW, when the Rascal compiler comes into the picture, some of this will have to be revisited.