Skip to content

Commit 2625495

Browse files
committed
pass URIs to the companion extension
1 parent 497c019 commit 2625495

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

editors/code/src/ctx.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ export class Ctx implements RustAnalyzerExtensionApi {
190190
if (this.config.discoverProjectRunner) {
191191
const command = `${this.config.discoverProjectRunner}.discoverWorkspaceCommand`;
192192
log.info(`running command: ${command}`);
193-
const project: JsonProject = await vscode.commands.executeCommand(command);
194-
this.setWorkspaces([project]);
193+
const uris = vscode.workspace.textDocuments
194+
.filter(isRustDocument)
195+
.map((document) => document.uri);
196+
const projects: JsonProject[] = await vscode.commands.executeCommand(command, uris);
197+
this.setWorkspaces(projects);
195198
}
196199

197200
if (this.workspace.kind === "Detached Files") {

0 commit comments

Comments
 (0)