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.rs3
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 f061e8637e..2e3271dc31 100644
--- a/crates/ide/src/syntax_highlighting/highlight.rs
+++ b/crates/ide/src/syntax_highlighting/highlight.rs
@@ -31,6 +31,9 @@ pub(super) fn token(sema: &Semantics<RootDatabase>, token: SyntaxToken) -> Optio
SymbolKind::Field.into()
}
INT_NUMBER | FLOAT_NUMBER_PART => HlTag::NumericLiteral.into(),
+ DOT if token.parent().map(|n| n.kind()) == Some(FLOAT_LITERAL) => {
+ HlTag::NumericLiteral.into()
+ }
BYTE => HlTag::ByteLiteral.into(),
CHAR => HlTag::CharLiteral.into(),
IDENT if token.parent().and_then(ast::TokenTree::cast).is_some() => {