From a662228de41a8b35d61b2bd312d30d34623e2232 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Mon, 20 Jul 2020 12:36:23 -0300 Subject: Assingment semantic highlight --- crates/ra_ide/src/syntax_highlighting.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 2b1b6a4fd..f088487fa 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs @@ -540,7 +540,7 @@ fn highlight_element( } } p if p.is_punct() => match p { - T![::] | T![->] | T![=>] | T![&] => HighlightTag::Operator.into(), + T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] => HighlightTag::Operator.into(), T![@] => HighlightTag::Operator | HighlightModifier::ControlFlow, T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { HighlightTag::Macro.into() @@ -573,6 +573,12 @@ fn highlight_element( _ if element.parent().and_then(ast::RangeExpr::cast).is_some() => { HighlightTag::Operator.into() } + _ if element.parent().and_then(ast::RangePat::cast).is_some() => { + HighlightTag::Operator.into() + } + _ if element.parent().and_then(ast::DotDotPat::cast).is_some() => { + HighlightTag::Operator.into() + } _ => HighlightTag::Punctuation.into(), }, -- cgit v1.2.3