Modifying initialize message

I want to customize the initialize message to the language server, how can this be done in Theia?

[original thread by Sören Domrös]

[Sören Domrös]

Specifically: I do not want to send the rootUri/rootPath or workspaceFolders to the language server

You can override https://github.com/theia-ide/theia/blob/8192a13763ee27931f499793786932505751da9c/packages/languages/src/node/language-server-contribution.ts#L65 for your language server and delete these properties

I’m wondering why you would want to do this, though…

[Sören Domrös]

I use xtext to build a language server, xtext automatically uses the rootPath to create a folder with xtext nature which tries to parse everythingin the workspace. In our eclipse product (without LS), which uses the same sources as the LS, we use our own Resources and build our own ResourceSet. So we do not want xtext to do that, since the LS fails to connect to a bigger workspace.

[Sören Domrös]

People form xtext advised me to disable this in the Theia client. I also found a way to disable that in the server

I also found a way to disable that in the server

That sounds like a better idea, since it will work with other clients, as well.

[Sören Domrös]

Yes :), I am however not completely sure whether that breaks something in the xtext language server