Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting/highlight.rs')
| -rw-r--r-- | crates/ide/src/syntax_highlighting/highlight.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs index 390b7efdeb..2111baad74 100644 --- a/crates/ide/src/syntax_highlighting/highlight.rs +++ b/crates/ide/src/syntax_highlighting/highlight.rs @@ -217,7 +217,9 @@ fn highlight_name_ref( // to anything when used. // We can fix this for derive attributes since derive helpers are recorded, but not for // general attributes. - None if name_ref.syntax().ancestors().any(|it| it.kind() == ATTR) => { + None if name_ref.syntax().ancestors().any(|it| it.kind() == ATTR) + && !sema.hir_file_for(name_ref.syntax()).is_derive_attr_pseudo_expansion(sema.db) => + { return HlTag::Symbol(SymbolKind::Attribute).into(); } None => return HlTag::UnresolvedReference.into(), |