aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/tags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/syntax_highlighting/tags.rs')
-rw-r--r--crates/ide/src/syntax_highlighting/tags.rs27
1 files changed, 13 insertions, 14 deletions
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs
index 336af3f4c..3bee0ae46 100644
--- a/crates/ide/src/syntax_highlighting/tags.rs
+++ b/crates/ide/src/syntax_highlighting/tags.rs
@@ -40,8 +40,14 @@ pub enum HlTag {
40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] 40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
41#[repr(u8)] 41#[repr(u8)]
42pub enum HlMod { 42pub enum HlMod {
43 /// Used for items in traits and impls.
44 Associated = 0,
43 /// Used to differentiate individual elements within attributes. 45 /// Used to differentiate individual elements within attributes.
44 Attribute = 0, 46 Attribute,
47 /// Callable item or value.
48 Callable,
49 /// Value that is being consumed in a function call
50 Consuming,
45 /// Used with keywords like `if` and `break`. 51 /// Used with keywords like `if` and `break`.
46 ControlFlow, 52 ControlFlow,
47 /// `foo` in `fn foo(x: i32)` is a definition, `foo` in `foo(90 + 2)` is 53 /// `foo` in `fn foo(x: i32)` is a definition, `foo` in `foo(90 + 2)` is
@@ -51,21 +57,14 @@ pub enum HlMod {
51 Documentation, 57 Documentation,
52 /// Highlighting injection like rust code in doc strings or ra_fixture. 58 /// Highlighting injection like rust code in doc strings or ra_fixture.
53 Injected, 59 Injected,
60 /// Used for intra doc links in doc injection.
61 IntraDocLink,
54 /// Mutable binding. 62 /// Mutable binding.
55 Mutable, 63 Mutable,
56 /// Value that is being consumed in a function call
57 Consuming,
58 /// Callable item or value.
59 Callable,
60 /// Used for associated functions. 64 /// Used for associated functions.
61 Static, 65 Static,
62 /// Used for items in traits and impls.
63 Associated,
64 /// Used for intra doc links in doc injection.
65 IntraDocLink,
66 /// Used for items in traits and trait impls. 66 /// Used for items in traits and trait impls.
67 Trait, 67 Trait,
68
69 // Keep this last! 68 // Keep this last!
70 /// Used for unsafe functions, mutable statics, union accesses and unsafe operations. 69 /// Used for unsafe functions, mutable statics, union accesses and unsafe operations.
71 Unsafe, 70 Unsafe,
@@ -175,17 +174,17 @@ impl fmt::Display for HlTag {
175 174
176impl HlMod { 175impl HlMod {
177 const ALL: &'static [HlMod; HlMod::Unsafe as u8 as usize + 1] = &[ 176 const ALL: &'static [HlMod; HlMod::Unsafe as u8 as usize + 1] = &[
177 HlMod::Associated,
178 HlMod::Attribute, 178 HlMod::Attribute,
179 HlMod::Callable,
180 HlMod::Consuming,
179 HlMod::ControlFlow, 181 HlMod::ControlFlow,
180 HlMod::Definition, 182 HlMod::Definition,
181 HlMod::Documentation, 183 HlMod::Documentation,
182 HlMod::IntraDocLink,
183 HlMod::Injected, 184 HlMod::Injected,
185 HlMod::IntraDocLink,
184 HlMod::Mutable, 186 HlMod::Mutable,
185 HlMod::Consuming,
186 HlMod::Callable,
187 HlMod::Static, 187 HlMod::Static,
188 HlMod::Associated,
189 HlMod::Trait, 188 HlMod::Trait,
190 HlMod::Unsafe, 189 HlMod::Unsafe,
191 ]; 190 ];