-
Notifications
You must be signed in to change notification settings - Fork 172
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
Eagerly activate workspaces for opened files #2283
Eagerly activate workspaces for opened files #2283
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question 👍
7908f3b
to
22cc312
Compare
scheme: "file", | ||
language: "ruby", | ||
}); | ||
const documentSelector = SUPPORTED_LANGUAGE_IDS.map((language) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be plural? documentSelectors
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I matched the type name, which is DocumentSelector
and is an array of entries.
Motivation
Fixes the issue reported in #1897 (comment)
In a multi-root workspace configuration, if you have a Ruby file opened for a secondary workspace, we don't eagerly activate that workspace, despite the file already being opened. You need to switch to another Ruby file for that workspace to have the language server activate, which is a bit odd.
Implementation
Started eagerly activating the workspace for the currently opened file if it's a Ruby file and if the workspace associated with it is not the same as the first one (to avoid any duplicate activations).