From b3383b06614e5f302a3afa2fc2c177303b5b6ca8 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Sun, 23 May 2021 16:22:13 +0300 Subject: Send detached files info to server via init params --- editors/code/src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editors/code/src/main.ts') 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) { if (workspaceFolder === undefined) { let rustDocuments = vscode.workspace.textDocuments.filter(document => isRustDocument(document)); if (rustDocuments.length > 0) { - ctx = await Ctx.create(config, context, serverPath); + ctx = await Ctx.create(config, context, serverPath, { kind: 'Detached files', files: rustDocuments }); } else { throw new Error("no rust files are opened"); } @@ -58,7 +58,7 @@ async function tryActivate(context: vscode.ExtensionContext) { // registers its `onDidChangeDocument` handler before us. // // This a horribly, horribly wrong way to deal with this problem. - ctx = await Ctx.create(config, context, serverPath, workspaceFolder.uri.fsPath); + ctx = await Ctx.create(config, context, serverPath, { kind: "Workspace Folder", folder: workspaceFolder.uri }); ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config)); } await initCommonContext(context, ctx); -- cgit v1.2.3