I've implemented a Language Server for a Java-like "toy" DSL based on Xtext together with a VS code extension and everything worked like a charm.
Trying to improve my language server a bit, I've added "imports" support and have leveraged the scoping system to resolve cross-file references and global scoping. Once again, it worked like a charm. Nonetheless, for the language server to be able to resolve imported classifiers, both files should live within the same workspace.
In order to enable global scoping outside the workspace boundaries, I am thinking of adding classpath definition file in YML, containing path to the other files that are referenced to by and that live outside the workspace boundaries. The idea would be to lazily resolve them when referenced to by other files. Let's say that the classpath specification will be in the same project as the referencing files.
Is this something we can do in Xtext? If so, can you please point me to some code snippets?
Thank you in advance,