-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Enable fuzzy matching for picker #34088
Comments
@ramya-rao-a I looked into this and this is because true fuzzy matching is not enabled for the picker. The difference to our current matching strategy is that true fuzzy matching allows to return a result as matching if the search characters are part of the target word even if there are other characters in between. The fact that I think it would be tough to enable this for all pickers so we might need an option here for the extension to enable this. |
Nice ~ |
@bpasero why are there even different algorithms being used? This is surprising to me. We surely can't expect users to think "is fuzzy search enabled in this picker? maybe I should search for
Why is that? |
@fabiospampinato the fuzzy scoring we do currently was tweaked for file names only, it is not a general purpose fuzzy scorer. That is why it was not enabled for all contexts. I think before we can do that we should revisit our current implementation and think about dropping in a better one that is just generally matching better. |
@bpasero I think the "filtering" and "ranking" logic should be considered separately. It would be pretty easy to enable fuzzy filtering everywhere (ranking results naively on the order of appearance) while still having a custom ranking logic for file paths. |
@bpasero I cannot figure out why here 1 matchs but 2 not ? More details here: microsoft/vscode-spring-initializr#26 (comment)
|
@Eskibear we have a heuristic when we should try to match on camel casing (by jumping over words), but this heuristic is limited to entries < 60 characters length for performance reasons. The second label simply seems too long for that kind of matching to apply. |
@bpasero it's been more than a couple of years since this was looked at. Has anything changed in the current state of VSCode that would make it easier to implement fuzzy search everywhere? This limitation has come up a number of times in extensions as can be seen from the mentions. |
I created alefragnani/vscode-project-manager#428 and was directed to here. It looks like there are quite a couple of supporting arguments to improve the current state of searching. Though what I am not sure about is why the behaviour in search is different when searching for different things. |
I recently switched from the IntelliJ world to VSCode and the fuzzy match algorithm of VSCode is slowly driving me insane. In addition to the cases here, one thing that IntelliJ gets really right is case sensitive matching of partial words and priority for local symbols. Check out this example. I am trying to match The result of this is that I frequently wind up with random variables and imports as a result of the correct result disappearing after I type more letters that should only increase its weight. |
Have a quick pick control with these values
["hello", "hello_there"]
Type
ht
orhello_
->hello_there
will show upType
he_
-> no resultsThe text was updated successfully, but these errors were encountered: