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

Can we have multiple language servers per workspace #48227

Closed
DonJayamanne opened this issue Apr 19, 2018 · 5 comments
Closed

Can we have multiple language servers per workspace #48227

DonJayamanne opened this issue Apr 19, 2018 · 5 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@DonJayamanne
Copy link
Contributor

Is it possible to somehow have multiple language servers per workspace?

I believe I know the answer (due to the simple fact that the stdin/stdout streams would end up being used by multiple lsps and this could be a problem).

@dbaeumer
Copy link
Member

Yes, even if the server uses stdio for communication. Every server can have its own stdio the client reads and writes from.

Do you see any problems.

On a normal web workspace you have a html, css, json, TS/JS and ESLint server running.

Closing the issue. Please ping if something is still unclear.

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Apr 21, 2018

@dbaeumer
Sorry but I should have been more specific.
Can we have multiple language servers for the same language in the same workspaces folder?

We haven't tried this yet, but plan on starting something that would require us to implement this technique.

@dbaeumer
Copy link
Member

In principal yes, but you would need to route the request to the right server using `patterns' for the document selector / filter. There is an example here that uses a separate server per workspace folder which could be taken as a base: https://github.com/Microsoft/vscode-extension-samples/tree/master/lsp-multi-server-sample

@DonJayamanne
Copy link
Contributor Author

In principal yes, but you would need to route the request to the right server using `patterns' for the document selector / filter

Hmm, let me lay it out better.
Our plan is to use a .net language server to provide intellisense, and a python language server to provide some other functionality such as linting (providing a list of problems). This means that both language servers will be working on the same workspace, and same files, but only responding to different messages in the protocol.

Anyways, from what you've told me, we should just try this out.
Our primary concern was whether this is NOT supported, even if it were to work.

@dbaeumer
Copy link
Member

@DonJayamanne that should actually work since you are simply dispatching different requests to different servers.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 4, 2018
@chrmarti chrmarti added *question Issue represents a question, should be posted to StackOverflow (VS Code) and removed question labels Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants