-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Respect the language_servers
setting's order when determining the primary language server
#15624
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cla-bot
bot
added
the
cla-signed
The user has signed the Contributor License Agreement
label
Aug 1, 2024
1 task
mrnugget
added a commit
that referenced
this pull request
Aug 1, 2024
maxdeviant
added a commit
that referenced
this pull request
Aug 1, 2024
This PR removes the primary/secondary distinction for `CachedLspAdapter`s. After #15624 we weren't relying on the `is_primary` field anywhere, so we can remove it. Release Notes: - N/A
SomeoneToIgnore
added a commit
that referenced
this pull request
Aug 22, 2024
… their languages (#16654) Follow-up of #15624 Fixes #13769 Fixes #16469 This way, those are considered "primary" and serve all LSP requests like go to definition. Before, Tailwind language server was first and returned nothing for all LSP requests. - Fixed Vue and Svelte languages integrations not handling LSP requests properly ([#13769](#13769)) ([#16469](#16469))
SomeoneToIgnore
added a commit
that referenced
this pull request
Aug 22, 2024
… their languages (#16654) Follow-up of #15624 Fixes #13769 Fixes #16469 This way, those are considered "primary" and serve all LSP requests like go to definition. Before, Tailwind language server was first and returned nothing for all LSP requests. - Fixed Vue and Svelte languages integrations not handling LSP requests properly ([#13769](#13769)) ([#16469](#16469))
SomeoneToIgnore
added a commit
that referenced
this pull request
Aug 22, 2024
… their languages (#16654) Follow-up of #15624 Fixes #13769 Fixes #16469 This way, those are considered "primary" and serve all LSP requests like go to definition. Before, Tailwind language server was first and returned nothing for all LSP requests. - Fixed Vue and Svelte languages integrations not handling LSP requests properly ([#13769](#13769)) ([#16469](#16469))
gcp-cherry-pick-bot bot
pushed a commit
that referenced
this pull request
Aug 22, 2024
… their languages (#16654) Follow-up of #15624 Fixes #13769 Fixes #16469 This way, those are considered "primary" and serve all LSP requests like go to definition. Before, Tailwind language server was first and returned nothing for all LSP requests. - Fixed Vue and Svelte languages integrations not handling LSP requests properly ([#13769](#13769)) ([#16469](#16469))
gcp-cherry-pick-bot bot
pushed a commit
that referenced
this pull request
Aug 22, 2024
… their languages (#16654) Follow-up of #15624 Fixes #13769 Fixes #16469 This way, those are considered "primary" and serve all LSP requests like go to definition. Before, Tailwind language server was first and returned nothing for all LSP requests. - Fixed Vue and Svelte languages integrations not handling LSP requests properly ([#13769](#13769)) ([#16469](#16469))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates how we determine the "primary" language server for a buffer to make it respect the order specified by the
language_servers
setting.Previously we were relying on the language servers to be registered in the right order in order to select the primary one effectively.
However, in my testing I observed some cases where a native language server (e.g.,
tailwindcss-language-server
) could end up first in the list of language servers despite not being first in thelanguage_servers
setting.While this wasn't a problem for the Tailwind or ESLint language servers on account of them being defined natively with the designation of "secondary" language servers, this could cause problems with extension-based language servers.
To remedy this, every time we start up language servers we reorder the list of language servers for a given language to reflect the order in the
language_servers
setting. This ordering then allows us to treat the first language server in the list as the "primary" one.Related issues:
Release Notes:
language_servers
setting.