diff options
author | Kirill Bulatov <[email protected]> | 2021-05-23 14:22:13 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-05-23 20:46:20 +0100 |
commit | b3383b06614e5f302a3afa2fc2c177303b5b6ca8 (patch) | |
tree | ecd109a689bdfd2885e1bd8ebcd181b2e98b4783 /editors/code/src/main.ts | |
parent | d9a5490646f68efdb70f84713d3a418a2b2a0b00 (diff) |
Send detached files info to server via init params
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); |