Langium LSP Java Conflict #15607
Replies: 1 comment
-
Hey @kapishsingla, Are you running Theia on a heavily resource constrained machine? Both the Java ls and the Langium ls run in separate processes, so they shouldn't block each other in any way. However, on resource constrained machines (i.e. few CPU cores or little RAM), having both of them start up at the same time can probably lead to the issues you're experiencing. As for deferring the Java initialization: In theory you can modify the package.json of your Java extension (see the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am currently facing an issue while initializing the workspace on browser. We are using
theia plugin
of java mentioned belowI'm using Langium for defining the backend grammar and providing the LSP server for my custom language. However, I'm running into a recurring issue when the Java plugin is also enabled in Theia.
Whenever .java files and a pom.xml are present in the workspace, the Java plugin starts resolving the Java files during workspace initialization. This appears to block or delay the Langium LSP server from initializing properly, and often leads to the Langium server crashing repeatedly.
To verify the issue, I tested by removing all .java files and the pom.xml from the workspace. With only my Langium language files present, the workspace initializes quickly, and the Langium LSP server works reliably without crashing.
This makes me suspect that the Java plugin is interfering with Langium's LSP server initialization—possibly due to resource contention or conflicting workspace handling.
Are there recommended ways to defer or disable Java file resolution, or otherwise isolate the Langium LSP server during initialization?
Beta Was this translation helpful? Give feedback.
All reactions