mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Highlight the name in macro declarations
This commit is contained in:
parent
11c0a5bb60
commit
22b75c4cea
3 changed files with 18 additions and 3 deletions
|
@ -167,6 +167,19 @@ pub(crate) fn highlight(
|
|||
binding_hash: None,
|
||||
});
|
||||
}
|
||||
if let Some(name) = mc.is_macro_rules() {
|
||||
if let Some((highlight, binding_hash)) = highlight_element(
|
||||
&sema,
|
||||
&mut bindings_shadow_count,
|
||||
name.syntax().clone().into(),
|
||||
) {
|
||||
stack.add(HighlightedRange {
|
||||
range: name.syntax().text_range(),
|
||||
highlight,
|
||||
binding_hash,
|
||||
});
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
WalkEvent::Leave(Some(mc)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue