aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
authorGrayJack <[email protected]>2020-07-21 03:37:31 +0100
committerGrayJack <[email protected]>2020-07-21 03:37:31 +0100
commit5ca3855c06b6e28aaa99f5fdda41b6b80ed871b7 (patch)
tree4092abfe62bd2a1bdb478d437884a4afaccca5ff /crates/ra_ide/src/syntax_highlighting.rs
parent04d8dc4a10be5e0c6a852011c98284f0121f3293 (diff)
On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 036180c60..d456d5d36 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -540,7 +540,6 @@ fn highlight_element(
540 } 540 }
541 } 541 }
542 p if p.is_punct() => match p { 542 p if p.is_punct() => match p {
543 T![#] => HighlightTag::Attribute.into(),
544 T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] | T![@] => { 543 T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] | T![@] => {
545 HighlightTag::Operator.into() 544 HighlightTag::Operator.into()
546 } 545 }
@@ -581,6 +580,9 @@ fn highlight_element(
581 _ if element.parent().and_then(ast::DotDotPat::cast).is_some() => { 580 _ if element.parent().and_then(ast::DotDotPat::cast).is_some() => {
582 HighlightTag::Operator.into() 581 HighlightTag::Operator.into()
583 } 582 }
583 _ if element.parent().and_then(ast::Attr::cast).is_some() => {
584 HighlightTag::Attribute.into()
585 }
584 _ => HighlightTag::Punctuation.into(), 586 _ => HighlightTag::Punctuation.into(),
585 }, 587 },
586 588