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

Fix duplicate LSP features appearing in multiroot workspaces #2101

Merged
merged 1 commit into from
May 30, 2024

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented May 29, 2024

Closes #2052

Co-authored with @vinistock

(TODO: Log an issue for vscode-languageserver-node about seeing unexpected requests for semanticToken for a workspace that isn't even open) microsoft/vscode-languageserver-node#1487

Screenshot 2024-05-29 at 12 06 39 PM

@andyw8 andyw8 mentioned this pull request May 29, 2024
@andyw8 andyw8 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 May 29, 2024
@andyw8 andyw8 changed the title Fix duplicate LSP features Fix duplicate LSP features appearing in multiroot workspaces May 29, 2024
@andyw8 andyw8 marked this pull request as ready for review May 30, 2024 17:42
@andyw8 andyw8 requested a review from a team as a code owner May 30, 2024 17:42
@andyw8 andyw8 requested a review from st0012 May 30, 2024 17:42
@andyw8 andyw8 merged commit 5e29a6d into main May 30, 2024
34 of 35 checks passed
@andyw8 andyw8 deleted the andyw8/fix-duplicate-lsp-features branch May 30, 2024 17:43
@st0012
Copy link
Member

st0012 commented May 31, 2024

I can't quite connect the code change with the problem it solves. Mind adding a bit of explanation on how it works 🤔

@andyw8
Copy link
Contributor Author

andyw8 commented May 31, 2024

For each app in the multiroot workspace there is a seperate LSP instance. If we have only documentSelector: [{ language: "ruby" }] then it causes each LSP instance to respond to the requests for Ruby files, causing the duplication. So we also need to limit each to the pattern corresponding to the workspace.

@st0012
Copy link
Member

st0012 commented May 31, 2024

Ah that makes sense. Thx 👍

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.

Duplicate test actions
3 participants