Add highlighting of items from other crates

This commit is contained in:
Aramis Razzaghipour 2021-05-23 23:45:26 +10:00
parent 064ff633f6
commit 4fd5248749
No known key found for this signature in database
GPG key ID: F788F7E990136003
6 changed files with 103 additions and 12 deletions

View file

@ -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<RootDatabase>,
root: InFile<&SyntaxNode>,
krate: Option<hir::Crate>,
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(),