Expand description
Built-in matchers (DESIGN.md §5.11.3).
Three shipped:
PrefixMatcher– query is a prefix of the candidate text. Case-insensitive whenctx.case_sensitiveis false (the default for cmdline use).SubstringMatcher– query appears anywhere in the candidate text.FuzzyMatcher– subsequence match (each char of the query appears in order in the candidate, possibly with skips). Score decays with the number of skipped chars;match_rangesrecords exactly which bytes the matcher consumed (so the renderer can paint them).
Structs§
- Fuzzy
Display Matcher match:fuzzy-display. Same 5-tier algorithm asFuzzyMatcherbut matches againstcandidate.displayinstead ofcandidate.text.- Fuzzy
Matcher match:fuzzy. Five-tier scoring (Exact → Prefix → Word- boundary subsequence → Substring → Fuzzy-subsequence with skip-decay).- Orderless
Display Matcher match:orderless-display.FuzzyDisplayMatcherwith the query read as a set of whitespace-separated components rather than one token — seecrate::orderlessfor the syntax and scoring.- Prefix
Matcher match:prefix. Default v1 matcher.- Substring
Matcher match:substring. Returns lower score than prefix.