Skip to main content

document_highlights

Function document_highlights 

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

Return all highlights for the identifier under the cursor.

Walks the tree-sitter parse tree to find every occurrence of the same identifier text and classifies each as Read or Write based on its syntactic context.