Skip to main content

CompletionHighlighter

Type Alias CompletionHighlighter 

Source
pub type CompletionHighlighter = dyn Fn(&str, &CompletionItem) -> Vec<Range<usize>>;
Expand description

Decides which bytes of a completion label the menu paints as the match.

query is the word typed since the menu opened. Returned ranges are byte offsets into CompletionItem::label.