Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the first workspace the main one even when lazy #2268

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

vinistock
Copy link
Member

Motivation

We only eagerly activate the first workspace if it is a Ruby workspace. In a scenario where the Ruby workspace is not the first one in the code workspace file (see #1897 (comment)), all LSP clients will be launched lazily.

Currently, we're assigning the mainWorkspace flag based on whether it was eagerly loaded, but that's not accurate in that scenario. We want the main workspace to be whatever the first one is - regardless of whether it was eagerly or lazily activated.

Implementation

Swapped the argument that determines the main workspace to not depend on whether it has been eagerly activated, but instead check if it is the first one we are activating.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Jul 8, 2024
@vinistock vinistock self-assigned this Jul 8, 2024
@vinistock vinistock requested a review from a team as a code owner July 8, 2024 19:34
@vinistock vinistock requested review from andyw8 and st0012 July 8, 2024 19:34
@vinistock vinistock merged commit 5025c27 into main Jul 8, 2024
36 checks passed
@vinistock vinistock deleted the vs/fix_main_workspace_assignment branch July 8, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants