Color attribute functions

This commit is contained in:
George Fraser 2020-05-12 21:58:51 -07:00
parent 38e8f35855
commit 47ce5ea581
7 changed files with 24 additions and 4 deletions

View file

@ -361,7 +361,9 @@ fn highlight_element(
}
// Highlight references like the definitions they resolve to
NAME_REF if element.ancestors().any(|it| it.kind() == ATTR) => return None,
NAME_REF if element.ancestors().any(|it| it.kind() == ATTR) => {
Highlight::from(HighlightTag::Function) | HighlightModifier::Attribute
}
NAME_REF => {
let name_ref = element.into_node().and_then(ast::NameRef::cast).unwrap();
match classify_name_ref(sema, &name_ref) {