diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-17 16:08:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-17 16:08:17 +0100 |
commit | f061b2daeb8639b5d24db8d73fa1e21d18196aa4 (patch) | |
tree | 2b1931cadd7400a09e6d10f0cb9ae4cc6646e93d /crates/ra_ide/src/syntax_highlighting/tags.rs | |
parent | 931f3173992df6ac6b728fa9fa9a94d15781027e (diff) | |
parent | 2145e2d878fb3b8ffcaa4ab0858cab3a7a4324e0 (diff) |
Merge #4925
4925: Syntax highlighting for escape sequences in strings r=matklad a=ltentrup
I have added a new semantic token type `ESCAPE_SEQUENCE` as the LSP specification does not seem to have an appropriate token type. This may actually be a regression for some users, as the TextMate Rust grammar has a scope `constant.character.escape.rust` which highlights escape sequences (which caused problems with semantic highlighting, see #4138).
Fixes #2604.
Co-authored-by: Leander Tentrup <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/tags.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting/tags.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tags.rs b/crates/ra_ide/src/syntax_highlighting/tags.rs index 94f466966..400d22fb6 100644 --- a/crates/ra_ide/src/syntax_highlighting/tags.rs +++ b/crates/ra_ide/src/syntax_highlighting/tags.rs | |||
@@ -23,6 +23,7 @@ pub enum HighlightTag { | |||
23 | Constant, | 23 | Constant, |
24 | Enum, | 24 | Enum, |
25 | EnumVariant, | 25 | EnumVariant, |
26 | EscapeSequence, | ||
26 | Field, | 27 | Field, |
27 | FormatSpecifier, | 28 | FormatSpecifier, |
28 | Function, | 29 | Function, |
@@ -71,6 +72,7 @@ impl HighlightTag { | |||
71 | HighlightTag::Constant => "constant", | 72 | HighlightTag::Constant => "constant", |
72 | HighlightTag::Enum => "enum", | 73 | HighlightTag::Enum => "enum", |
73 | HighlightTag::EnumVariant => "enum_variant", | 74 | HighlightTag::EnumVariant => "enum_variant", |
75 | HighlightTag::EscapeSequence => "escape_sequence", | ||
74 | HighlightTag::Field => "field", | 76 | HighlightTag::Field => "field", |
75 | HighlightTag::FormatSpecifier => "format_specifier", | 77 | HighlightTag::FormatSpecifier => "format_specifier", |
76 | HighlightTag::Function => "function", | 78 | HighlightTag::Function => "function", |