diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting/highlight.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting/highlight.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs index 9503c936d..84012227d 100644 --- a/crates/ide/src/syntax_highlighting/highlight.rs +++ b/crates/ide/src/syntax_highlighting/highlight.rs | |||
@@ -131,6 +131,9 @@ pub(super) fn element( | |||
131 | } | 131 | } |
132 | STRING | BYTE_STRING => HlTag::StringLiteral.into(), | 132 | STRING | BYTE_STRING => HlTag::StringLiteral.into(), |
133 | ATTR => HlTag::Attribute.into(), | 133 | ATTR => HlTag::Attribute.into(), |
134 | INT_NUMBER if element.ancestors().nth(1).map_or(false, |it| it.kind() == FIELD_EXPR) => { | ||
135 | SymbolKind::Field.into() | ||
136 | } | ||
134 | INT_NUMBER | FLOAT_NUMBER => HlTag::NumericLiteral.into(), | 137 | INT_NUMBER | FLOAT_NUMBER => HlTag::NumericLiteral.into(), |
135 | BYTE => HlTag::ByteLiteral.into(), | 138 | BYTE => HlTag::ByteLiteral.into(), |
136 | CHAR => HlTag::CharLiteral.into(), | 139 | CHAR => HlTag::CharLiteral.into(), |