Highlight the name in macro declarations

This commit is contained in:
Matthew Jasper 2020-05-10 16:08:54 +01:00
parent 11c0a5bb60
commit 22b75c4cea
3 changed files with 18 additions and 3 deletions

View file

@ -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)) => {