aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/tags.rs
diff options
context:
space:
mode:
authorhi-rustin <[email protected]>2021-05-14 03:36:12 +0100
committerhi-rustin <[email protected]>2021-05-14 03:47:00 +0100
commitb98c119ba690afdcd21edb3b344834e42422df0a (patch)
tree5e62ad72b3d2fbaa952f42704a7415721b0acff5 /crates/ide/src/syntax_highlighting/tags.rs
parent9803a9a148e1c5850d2f649ffbc1bb3575cfa929 (diff)
Apply async semantic token modifier to async/await keywords
Only async semantic token modifier
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tags.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tags.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs
index a304b3250..f4a2e7506 100644
--- a/crates/ide/src/syntax_highlighting/tags.rs
+++ b/crates/ide/src/syntax_highlighting/tags.rs
@@ -65,6 +65,8 @@ pub enum HlMod {
65 Static, 65 Static,
66 /// Used for items in traits and trait impls. 66 /// Used for items in traits and trait impls.
67 Trait, 67 Trait,
68 /// Used with keywords like `async` and `await`.
69 Async,
68 // Keep this last! 70 // Keep this last!
69 /// Used for unsafe functions, mutable statics, union accesses and unsafe operations. 71 /// Used for unsafe functions, mutable statics, union accesses and unsafe operations.
70 Unsafe, 72 Unsafe,
@@ -186,6 +188,7 @@ impl HlMod {
186 HlMod::Mutable, 188 HlMod::Mutable,
187 HlMod::Static, 189 HlMod::Static,
188 HlMod::Trait, 190 HlMod::Trait,
191 HlMod::Async,
189 HlMod::Unsafe, 192 HlMod::Unsafe,
190 ]; 193 ];
191 194
@@ -203,6 +206,7 @@ impl HlMod {
203 HlMod::Mutable => "mutable", 206 HlMod::Mutable => "mutable",
204 HlMod::Static => "static", 207 HlMod::Static => "static",
205 HlMod::Trait => "trait", 208 HlMod::Trait => "trait",
209 HlMod::Async => "async",
206 HlMod::Unsafe => "unsafe", 210 HlMod::Unsafe => "unsafe",
207 } 211 }
208 } 212 }