diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/server.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index b3a874b38..f319f148a 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts | |||
@@ -12,19 +12,17 @@ export class Server { | |||
12 | public static start( | 12 | public static start( |
13 | notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]> | 13 | notificationHandlers: Iterable<[string, lc.GenericNotificationHandler]> |
14 | ) { | 14 | ) { |
15 | |||
16 | // '.' Is the fallback if no folder is open | 15 | // '.' Is the fallback if no folder is open |
17 | // TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file. | 16 | // TODO?: Workspace folders support Uri's (eg: file://test.txt). It might be a good idea to test if the uri points to a file. |
18 | let folder: string = '.'; | 17 | let folder: string = '.'; |
19 | if (workspace.workspaceFolders !== undefined) { | 18 | if (workspace.workspaceFolders !== undefined) { |
19 | folder = workspace.workspaceFolders[0].uri.fsPath.toString(); | ||
20 | 20 | ||
21 | folder = workspace | ||
22 | .workspaceFolders[0].uri.fsPath | ||
23 | .toString(); | ||
24 | |||
25 | if (workspace.workspaceFolders.length > 1) { | 21 | if (workspace.workspaceFolders.length > 1) { |
26 | // Tell the user that we do not support multi-root workspaces yet | 22 | // Tell the user that we do not support multi-root workspaces yet |
27 | window.showWarningMessage('Multi-root workspaces are not currently supported'); | 23 | window.showWarningMessage( |
24 | 'Multi-root workspaces are not currently supported' | ||
25 | ); | ||
28 | } | 26 | } |
29 | } | 27 | } |
30 | 28 | ||