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: ls provider's score is equal to the default one #4722

Merged
merged 2 commits into from
Aug 22, 2023

Commits on Aug 5, 2023

  1. 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 <tcx4c70@gmail.com>
    tcx4c70 committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    d51c04c View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. test: Add a testcase for score

    Signed-off-by: Adam Tao <tcx4c70@gmail.com>
    tcx4c70 committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    ff02fd4 View commit details
    Browse the repository at this point in the history