Add KFuzzyMatcher for fuzzy filtering of strings
This is a proposal to add a fuzzy matching utility to KCoreAddons. I added it to Kate initially to test its capabilities and it has been amazing so far.
This utility does fuzzy matching and outputs two results i.e., a boolean and an integer (success, score). The score is calculated on the basis of distance, whether the match was found on separators or was it sequential. This makes it useful for a variety of applications but some tuning for specific usecases might be necessary in order to produce better results.
The original author wrote a blog post about it which can be read for more detailed info on this: https://www.forrestthewoods.com/blog/reverse_engineering_sublime_texts_fuzzy_match
To test its capabilities, One can try Kate's Quickopen / Commandbar which uses this for filtering and sorting results.
Performance is good for normal cases. I have tested Kate's quickopen with LLVM's code base, 97K files, with 2 entries per file in the model(name, path) on which we filter, and there was a tiny lag but it was still very usable.