Problems with uncooperative language servers

A couple of language server (omnisharp, python, currently java) are not picking up when new projects are created inside the currently open folder.
I know that we can restart the language server plugins by doing a browser refresh. However, that is quite disrupting. Does anyone see a clear way how we could restart the relevant plugins in a “cheaper” way?

[original thread by Thomas Mäder]


The same issues exist also on vscode?

~Is it about Theia extensions or VS Code extensions?~ read again, about plugins

Maybe an extension is activated too eagerly before project files are in the workspace.

i.e java extension should not be activated eagerly:

you can try whether this PR helps

if it is the same in VS Code, then vscode extensions or language servers should be improved to listen to workspace changes and pick up new projects.

I think early activation is one thing that aggravates this problem, but you can always have the case where you have one project open and you clone a second one in the same base folder.

The problem is: language servers in real life don’t pick this up (Python LS from Microsoft comes to mind).

In an environment like Che, where our project location is basically fixed and we auto-open the IDE, the problem happens more often.

That’s why I was looking for a way to mitigate the issue a bit.