diff options
author | Leander Tentrup <[email protected]> | 2020-06-17 14:27:13 +0100 |
---|---|---|
committer | Leander Tentrup <[email protected]> | 2020-06-17 14:27:13 +0100 |
commit | 2145e2d878fb3b8ffcaa4ab0858cab3a7a4324e0 (patch) | |
tree | 2b1931cadd7400a09e6d10f0cb9ae4cc6646e93d /crates/rust-analyzer | |
parent | 931f3173992df6ac6b728fa9fa9a94d15781027e (diff) |
Syntax highlighting for escape sequences in strings
Diffstat (limited to 'crates/rust-analyzer')
-rw-r--r-- | crates/rust-analyzer/src/semantic_tokens.rs | 1 | ||||
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index 6f125c37c..2ea63d33b 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs | |||
@@ -45,6 +45,7 @@ define_semantic_token_types![ | |||
45 | (UNION, "union"), | 45 | (UNION, "union"), |
46 | (UNRESOLVED_REFERENCE, "unresolvedReference"), | 46 | (UNRESOLVED_REFERENCE, "unresolvedReference"), |
47 | (FORMAT_SPECIFIER, "formatSpecifier"), | 47 | (FORMAT_SPECIFIER, "formatSpecifier"), |
48 | (ESCAPE_SEQUENCE, "escapeSequence"), | ||
48 | ]; | 49 | ]; |
49 | 50 | ||
50 | macro_rules! define_semantic_token_modifiers { | 51 | macro_rules! define_semantic_token_modifiers { |
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 2851b4d31..055c97455 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -324,6 +324,7 @@ fn semantic_token_type_and_modifiers( | |||
324 | HighlightTag::UnresolvedReference => semantic_tokens::UNRESOLVED_REFERENCE, | 324 | HighlightTag::UnresolvedReference => semantic_tokens::UNRESOLVED_REFERENCE, |
325 | HighlightTag::FormatSpecifier => semantic_tokens::FORMAT_SPECIFIER, | 325 | HighlightTag::FormatSpecifier => semantic_tokens::FORMAT_SPECIFIER, |
326 | HighlightTag::Operator => lsp_types::SemanticTokenType::OPERATOR, | 326 | HighlightTag::Operator => lsp_types::SemanticTokenType::OPERATOR, |
327 | HighlightTag::EscapeSequence => semantic_tokens::ESCAPE_SEQUENCE, | ||
327 | }; | 328 | }; |
328 | 329 | ||
329 | for modifier in highlight.modifiers.iter() { | 330 | for modifier in highlight.modifiers.iter() { |