From 33832d43fcc10fd6da0edf004d575f3576d9e91d Mon Sep 17 00:00:00 2001 From: Leander Tentrup Date: Mon, 13 Jul 2020 22:59:42 +0200 Subject: Highlight punctuation as `HighlightTag::Operator` --- crates/ra_ide/src/syntax_highlighting.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_ide/src/syntax_highlighting.rs') diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index b3236e821..6067207d9 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs @@ -553,6 +553,7 @@ fn highlight_element( T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { Highlight::new(HighlightTag::Macro) } + p if p.is_punct() => HighlightTag::Operator.into(), k if k.is_keyword() => { let h = Highlight::new(HighlightTag::Keyword); -- cgit v1.2.3 From 119e71d9ea6448c49f597af3e0afefa6bf0f12ac Mon Sep 17 00:00:00 2001 From: Leander Tentrup Date: Wed, 15 Jul 2020 16:34:11 +0200 Subject: Add new `Punctuation` highlight tag --- crates/ra_ide/src/syntax_highlighting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src/syntax_highlighting.rs') diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 6067207d9..6ac44c2c0 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs @@ -553,7 +553,7 @@ fn highlight_element( T![!] if element.parent().and_then(ast::MacroCall::cast).is_some() => { Highlight::new(HighlightTag::Macro) } - p if p.is_punct() => HighlightTag::Operator.into(), + p if p.is_punct() => HighlightTag::Punctuation.into(), k if k.is_keyword() => { let h = Highlight::new(HighlightTag::Keyword); -- cgit v1.2.3