How can I get the "root" directory inside a ScopeProvider? #1775
-
Hallo, I implement a custom ScopeProvider which uses the DefaultScopeProvider as a base and override the getGlobalScope with custom logic. I need a way to get the current "root" directory of the files (when they are edited inside VS Code), but I can't find any API to get this information. I tried to google and asked some chat bots, but they all gave me answers with an outdated API. I have access to the LangiumCoreServices, which has access to TextDocumentProvider, WorkspaceManager, FileSystemProvider, LangiumDocuments and many other things but I checked all of them and couldn't find any functions which would give me the root directory. Additional info: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
maybe calling |
Beta Was this translation helpful? Give feedback.
maybe calling
serivces.shared.workspace.WorkspaceManager.workspaceFolders()
does the trick