Closed msujew closed 1 month ago
This is a second iteration on the fix of https://github.com/eclipse-langium/langium/pull/1455. This idea came up while helping with https://github.com/eclipse-langium/langium/discussions/1488: The TextDocument is always aware of the language ID used in the language client, even if the file extension doesn't fit. We can use that info (assuming a TextDocument instance is available for the given URI) to make the ServiceRegistry more accurate.
TextDocument
ServiceRegistry
This also fixes issues experienced when creating an untitled file and setting the language to a DSL language (in multi-language projects).
This is a second iteration on the fix of https://github.com/eclipse-langium/langium/pull/1455. This idea came up while helping with https://github.com/eclipse-langium/langium/discussions/1488: The
TextDocument
is always aware of the language ID used in the language client, even if the file extension doesn't fit. We can use that info (assuming aTextDocument
instance is available for the given URI) to make theServiceRegistry
more accurate.This also fixes issues experienced when creating an untitled file and setting the language to a DSL language (in multi-language projects).