File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/langium/src/workspace Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ export interface WorkspaceManager {
3535 */
3636 readonly ready : Promise < void > ;
3737
38+ /**
39+ * The workspace folders of the current workspace.
40+ * Available only after the `ready` promise resolves.
41+ */
42+ get workspaceFolders ( ) : readonly WorkspaceFolder [ ] | undefined ;
43+
3844 /**
3945 * When used in a language server context, this method is called when the server receives
4046 * the `initialize` request.
@@ -85,6 +91,10 @@ export class DefaultWorkspaceManager implements WorkspaceManager {
8591 return this . _ready . promise ;
8692 }
8793
94+ get workspaceFolders ( ) : readonly WorkspaceFolder [ ] | undefined {
95+ return this . folders ;
96+ }
97+
8898 initialize ( params : InitializeParams ) : void {
8999 this . folders = params . workspaceFolders ?? undefined ;
90100 }
You can’t perform that action at this time.
0 commit comments