diff options
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r-- | editors/code/src/main.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index f0f47a75b..1a4af548d 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -49,7 +49,7 @@ async function tryActivate(context: vscode.ExtensionContext) { | |||
49 | if (workspaceFolder === undefined) { | 49 | if (workspaceFolder === undefined) { |
50 | let rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document)); | 50 | let rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document)); |
51 | if (rustDocuments.length > 0) { | 51 | if (rustDocuments.length > 0) { |
52 | ctx = await Ctx.create(config, context, serverPath); | 52 | ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached files', files: rustDocuments }); |
53 | } else { | 53 | } else { |
54 | throw new Error("no rust files are opened"); | 54 | throw new Error("no rust files are opened"); |
55 | } | 55 | } |
@@ -58,7 +58,7 @@ async function tryActivate(context: vscode.ExtensionContext) { | |||
58 | // registers its `onDidChangeDocument` handler before us. | 58 | // registers its `onDidChangeDocument` handler before us. |
59 | // | 59 | // |
60 | // This a horribly, horribly wrong way to deal with this problem. | 60 | // This a horribly, horribly wrong way to deal with this problem. |
61 | ctx = await Ctx.create(config, context, serverPath, workspaceFolder.uri.fsPath); | 61 | ctx = await Ctx.create(config, context, serverPath, { kind: "Workspace Folder", folder: workspaceFolder.uri }); |
62 | ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config)); | 62 | ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config)); |
63 | } | 63 | } |
64 | await initCommonContext(context, ctx); | 64 | await initCommonContext(context, ctx); |