Skip to main content

highlight_characters

Function highlight_characters 

Source
pub fn highlight_characters(
    query: &str,
    item: &CompletionItem,
) -> Vec<Range<usize>>
Expand description

Highlight each character of query in order, skipping characters in between.

Matching is case-insensitive. Adjacent hits merge into one range, so a contiguous match still paints as a single span. A query that cannot be matched in full paints nothing.