about summary refs log tree commit diff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2021-08-04 14:17:56 +0200
committerLukas Wirth <lukastw97@gmail.com>2021-08-04 19:00:52 +0200
commitf55441f7ed944fa0fd56a2a225fb72ee5a5044c0 (patch)
tree810bae5dcbad9c343533a3e8534c7438eca9276d /crates/ide/src
parent294cfd61c79d031da20e042c56cf621db1918228 (diff)
downloadrust-f55441f7ed944fa0fd56a2a225fb72ee5a5044c0.tar.gz
rust-f55441f7ed944fa0fd56a2a225fb72ee5a5044c0.zip
Document reference highlighting mod
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/syntax_highlighting.rs3
-rw-r--r--crates/ide/src/syntax_highlighting/tags.rs12
2 files changed, 8 insertions, 7 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index b8e62a1a860..c6b8a77be73 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -138,8 +138,9 @@ pub struct HlRange {
 // injected:: Emitted for doc-string injected highlighting like rust source blocks in documentation.
 // intraDocLink:: Emitted for intra doc links in doc-strings.
 // library:: Emitted for items that are defined outside of the current crate.
+// mutable:: Emitted for mutable locals and statics as well as functions taking `&mut self`.
 // public:: Emitted for items that are from the current crate and are `pub`.
-// mutable:: Emitted for mutable locals and statics.
+// reference: Emitted for locals behind a reference and functions taking `self` by reference.
 // static:: Emitted for "static" functions, also known as functions that do not take a `self` param, as well as statics and consts.
 // trait:: Emitted for associated trait items.
 // unsafe:: Emitted for unsafe operations, like unsafe function calls, as well as the `unsafe` token.
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs
index 95c6a3d5af8..dc5dfec1165 100644
--- a/crates/ide/src/syntax_highlighting/tags.rs
+++ b/crates/ide/src/syntax_highlighting/tags.rs
@@ -45,6 +45,8 @@ pub enum HlTag {
 pub enum HlMod {
     /// Used for items in traits and impls.
     Associated = 0,
+    /// Used with keywords like `async` and `await`.
+    Async,
     /// Used to differentiate individual elements within attributes.
     Attribute,
     /// Callable item or value.
@@ -62,20 +64,18 @@ pub enum HlMod {
     Injected,
     /// Used for intra doc links in doc injection.
     IntraDocLink,
+    /// Used for items from other crates.
+    Library,
     /// Mutable binding.
     Mutable,
+    /// Used for public items.
+    Public,
     /// Immutable reference.
     Reference,
     /// Used for associated functions.
     Static,
     /// Used for items in traits and trait impls.
     Trait,
-    /// Used with keywords like `async` and `await`.
-    Async,
-    /// Used for items from other crates.
-    Library,
-    /// Used for public items.
-    Public,
     // Keep this last!
     /// Used for unsafe functions, unsafe traits, mutable statics, union accesses and unsafe operations.
     Unsafe,