support dict variant for priority_selector #2714
Draft
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.

Want to get opinions about this solution.
Support
priority_selectorin a dict form where the keys are names of providers and values are selectors. There is also a special*key which acts as a fallback when no specific provider matches.This allows to fix handling for
renameProviderin LSP-vue where intext.html.vuescope (template block) LSP-vue should handle renaming while intext.html.vue source.js|tsLSP-typescript should handle renaming. The setting for this would look something like:I'm making this a draft to get opinions before I do final touches and to also give me time to check handling for other providers in LSP-vue (want to make sure that all problematic cases can be fixed with this).
Fixes #2526