Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ls provider's score is equal to the default one (#4722)
* fix: ls provider's score is equal to the default one For now, ls provider's score will be equal to the default one if ls provider's documentSelector has pattern. For example, a ls registers capability `textDocument/documentHighlight` with documentSelector `{'language': 'cs', 'scheme': 'file', 'pattern': '**/*.cs'}`, it will get score 5, which is equal to the default one with documentSelector '*', even if the language id has matched. Since the capability is registered later than the default one, DocumentHighlightManager will only use the default one to provide highlight, which is not expected. If all of language, scheme, and pattern match, we should return the highest score of them, instead of the last score. Signed-off-by: Adam Tao <[email protected]> * test: Add a testcase for score Signed-off-by: Adam Tao <[email protected]> --------- Signed-off-by: Adam Tao <[email protected]>
- Loading branch information