How to handle multi-languages language servers #1222
-
Hi there, In our project, we have different languages/diagrams have the same document, so we overridden Is this an issue? Or we're messing something? Should I create a clone of the project? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
Do you get any error from the language server when you request completions? Does it generate diagnostics as expected? The first issue to rule out would be to identify whether the language service selector/registry is at fault or whether the logic doesn't play nicely with the completion provider. |
Beta Was this translation helpful? Give feedback.
-
The weird part is that when running the languages as a VSCode extension, it doesn't run any services, not even the parser. |
Beta Was this translation helpful? Give feedback.
Your service registry is missing an override for the
all
getter:The language server tries to identify whether it needs to register a completion provider based on the info that any service has a completion provider at all. It does this by looking through the
all
property. In your case, it always stays empty, so no language services are registered.I've investigated the completion issue a bit and saw that the completion parser arrives at an unexpected state:
The added
\n
token doesn't appear in the input, but gets added by the lexer. As mentioned before, completion in whitespace-sensitive languages doesn't …