Skip to main content

document_highlights

Function document_highlights 

Source
pub fn document_highlights(
    source: &str,
    doc: &ParsedDoc,
    position: Position,
) -> Vec<DocumentHighlight>
Expand description

Return all ranges in the document where the word at position appears. For $variables the search is scope-aware: only occurrences within the same function/method scope are returned, preventing unrelated variables with the same name in other scopes from being highlighted.