mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Add highlighting of items from other crates
This commit is contained in:
parent
064ff633f6
commit
4fd5248749
6 changed files with 103 additions and 12 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue