Skip to content

Commit

Permalink
Merge pull request #2753 from Shopify/fix-lazy-activation
Browse files Browse the repository at this point in the history
Fix activation on files that were previously opened
  • Loading branch information
dirceu authored Oct 22, 2024
2 parents 2286ceb + b543e25 commit 87aef4c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vscode/src/rubyLsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,14 @@ export class RubyLsp {
const workspaceFolder = vscode.workspace.getWorkspaceFolder(
activeDocument.uri,
);
if (workspaceFolder) {
const existingWorkspace = this.workspaces.get(
workspaceFolder.uri.toString(),
);

if (workspaceFolder && workspaceFolder !== firstWorkspace) {
await this.activateWorkspace(workspaceFolder, true);
if (workspaceFolder && !existingWorkspace) {
await this.activateWorkspace(workspaceFolder, false);
}
}
}

Expand Down

0 comments on commit 87aef4c

Please sign in to comment.