From 4fd5248749202e0578d719bc5480171a85358836 Mon Sep 17 00:00:00 2001 From: Aramis Razzaghipour Date: Sun, 23 May 2021 23:45:26 +1000 Subject: Add highlighting of items from other crates --- crates/ide/src/syntax_highlighting.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ide/src/syntax_highlighting.rs') diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 9df8d21af..cf1a8bad7 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -80,6 +80,7 @@ pub(crate) fn highlight( &mut hl, &sema, InFile::new(file_id.into(), &root), + sema.scope(&root).krate(), range_to_highlight, syntactic_name_ref_highlighting, ); @@ -90,6 +91,7 @@ fn traverse( hl: &mut Highlights, sema: &Semantics, root: InFile<&SyntaxNode>, + krate: Option, range_to_highlight: TextRange, syntactic_name_ref_highlighting: bool, ) { @@ -209,6 +211,7 @@ fn traverse( if let Some((mut highlight, binding_hash)) = highlight::element( &sema, + krate, &mut bindings_shadow_count, syntactic_name_ref_highlighting, element_to_highlight.clone(), -- cgit v1.2.3