aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorAramis Razzaghipour <[email protected]>2021-05-23 14:45:26 +0100
committerAramis Razzaghipour <[email protected]>2021-05-24 05:53:48 +0100
commit4fd5248749202e0578d719bc5480171a85358836 (patch)
tree69d1e6928bb9b7fa527835703890c4ee5343e5ca /crates/ide/src/syntax_highlighting.rs
parent064ff633f6055ed35022222c89af01d3f9943e3c (diff)
Add highlighting of items from other crates
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ide/src/syntax_highlighting.rs3
1 files changed, 3 insertions, 0 deletions
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(
80 &mut hl, 80 &mut hl,
81 &sema, 81 &sema,
82 InFile::new(file_id.into(), &root), 82 InFile::new(file_id.into(), &root),
83 sema.scope(&root).krate(),
83 range_to_highlight, 84 range_to_highlight,
84 syntactic_name_ref_highlighting, 85 syntactic_name_ref_highlighting,
85 ); 86 );
@@ -90,6 +91,7 @@ fn traverse(
90 hl: &mut Highlights, 91 hl: &mut Highlights,
91 sema: &Semantics<RootDatabase>, 92 sema: &Semantics<RootDatabase>,
92 root: InFile<&SyntaxNode>, 93 root: InFile<&SyntaxNode>,
94 krate: Option<hir::Crate>,
93 range_to_highlight: TextRange, 95 range_to_highlight: TextRange,
94 syntactic_name_ref_highlighting: bool, 96 syntactic_name_ref_highlighting: bool,
95) { 97) {
@@ -209,6 +211,7 @@ fn traverse(
209 211
210 if let Some((mut highlight, binding_hash)) = highlight::element( 212 if let Some((mut highlight, binding_hash)) = highlight::element(
211 &sema, 213 &sema,
214 krate,
212 &mut bindings_shadow_count, 215 &mut bindings_shadow_count,
213 syntactic_name_ref_highlighting, 216 syntactic_name_ref_highlighting,
214 element_to_highlight.clone(), 217 element_to_highlight.clone(),