diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tags.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting/tags.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs index 27473a2f9..9d481deae 100644 --- a/crates/ide/src/syntax_highlighting/tags.rs +++ b/crates/ide/src/syntax_highlighting/tags.rs | |||
@@ -37,6 +37,8 @@ pub enum HlTag { | |||
37 | None, | 37 | None, |
38 | } | 38 | } |
39 | 39 | ||
40 | // Don't forget to adjust the feature description in crates/ide/src/syntax_highlighting.rs. | ||
41 | // And make sure to use the lsp strings used when converting to the protocol in crates\rust-analyzer\src\semantic_tokens.rs, not the names of the variants here. | ||
40 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] | 42 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] |
41 | #[repr(u8)] | 43 | #[repr(u8)] |
42 | pub enum HlMod { | 44 | pub enum HlMod { |
@@ -67,6 +69,8 @@ pub enum HlMod { | |||
67 | Trait, | 69 | Trait, |
68 | /// Used with keywords like `async` and `await`. | 70 | /// Used with keywords like `async` and `await`. |
69 | Async, | 71 | Async, |
72 | /// Used for items from other crates. | ||
73 | Library, | ||
70 | // Keep this last! | 74 | // Keep this last! |
71 | /// Used for unsafe functions, unsafe traits, mutable statics, union accesses and unsafe operations. | 75 | /// Used for unsafe functions, unsafe traits, mutable statics, union accesses and unsafe operations. |
72 | Unsafe, | 76 | Unsafe, |
@@ -189,6 +193,7 @@ impl HlMod { | |||
189 | HlMod::Static, | 193 | HlMod::Static, |
190 | HlMod::Trait, | 194 | HlMod::Trait, |
191 | HlMod::Async, | 195 | HlMod::Async, |
196 | HlMod::Library, | ||
192 | HlMod::Unsafe, | 197 | HlMod::Unsafe, |
193 | ]; | 198 | ]; |
194 | 199 | ||
@@ -207,6 +212,7 @@ impl HlMod { | |||
207 | HlMod::Static => "static", | 212 | HlMod::Static => "static", |
208 | HlMod::Trait => "trait", | 213 | HlMod::Trait => "trait", |
209 | HlMod::Async => "async", | 214 | HlMod::Async => "async", |
215 | HlMod::Library => "library", | ||
210 | HlMod::Unsafe => "unsafe", | 216 | HlMod::Unsafe => "unsafe", |
211 | } | 217 | } |
212 | } | 218 | } |