diff --git a/crates/ide/src/syntax_highlighting/highlights.rs b/crates/ide/src/syntax_highlighting/highlights.rs index 3e733c87c6..7ff1593aef 100644 --- a/crates/ide/src/syntax_highlighting/highlights.rs +++ b/crates/ide/src/syntax_highlighting/highlights.rs @@ -20,7 +20,7 @@ impl Highlights { Highlights { root: Node::new(HighlightedRange { range, - highlight: HighlightTag::Dummy.into(), + highlight: HighlightTag::None.into(), binding_hash: None, }), } diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs index a0286b72d9..07c788b50b 100644 --- a/crates/ide/src/syntax_highlighting/tags.rs +++ b/crates/ide/src/syntax_highlighting/tags.rs @@ -33,8 +33,8 @@ pub enum HighlightTag { Operator, UnresolvedReference, - // For things which don't have proper Tag, but want to use modifiers. - Dummy, + // For things which don't have a specific highlight. + None, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] @@ -100,7 +100,7 @@ impl HighlightTag { HighlightTag::Operator => "operator", HighlightTag::StringLiteral => "string_literal", HighlightTag::UnresolvedReference => "unresolved_reference", - HighlightTag::Dummy => "dummy", + HighlightTag::None => "none", } } } @@ -174,7 +174,7 @@ impl Highlight { Highlight { tag, modifiers: HighlightModifiers::default() } } pub fn is_empty(&self) -> bool { - self.tag == HighlightTag::Dummy && self.modifiers == HighlightModifiers::default() + self.tag == HighlightTag::None && self.modifiers == HighlightModifiers::default() } } diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html b/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html index 9d42b11c1e..7d1d2a8399 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html @@ -37,7 +37,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd .unresolved_reference { color: #FC5555; text-decoration: wavy underline; }
/// ```
-/// let _ = "early doctests should not go boom";
+/// let _ = "early doctests should not go boom";
/// ```
struct Foo {
bar: bool,
@@ -45,7 +45,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
impl Foo {
/// ```
- /// let _ = "Call me
+ /// let _ = "Call me
// KILLER WHALE
/// Ishmael.";
/// ```
@@ -56,8 +56,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
/// # Examples
///
/// ```
- /// # #![allow(unused_mut)]
- /// let mut foo: Foo = Foo::new();
+ /// # #![allow(unused_mut)]
+ /// let mut foo: Foo = Foo::new();
/// ```
pub const fn new() -> Foo {
Foo { bar: true }
@@ -68,26 +68,26 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
/// # Examples
///
/// ```
- /// use x::y;
+ /// use x::y;
///
- /// let foo = Foo::new();
+ /// let foo = Foo::new();
///
/// // calls bar on foo
- /// assert!(foo.bar());
+ /// assert!(foo.bar());
///
- /// let bar = foo.bar || Foo::bar;
+ /// let bar = foo.bar || Foo::bar;
///
/// /* multi-line
/// comment */
///
- /// let multi_line_string = "Foo
+ /// let multi_line_string = "Foo
/// bar
/// ";
///
/// ```
///
/// ```rust,no_run
- /// let foobar = Foo::new().bar();
+ /// let foobar = Foo::new().bar();
/// ```
///
/// ```sh
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 204cae2654..4cfe6ff513 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -413,7 +413,7 @@ fn semantic_token_type_and_modifiers(
SymbolKind::Macro => lsp_types::SemanticTokenType::MACRO,
},
HighlightTag::BuiltinType => semantic_tokens::BUILTIN_TYPE,
- HighlightTag::Dummy => semantic_tokens::GENERIC,
+ HighlightTag::None => semantic_tokens::GENERIC,
HighlightTag::ByteLiteral | HighlightTag::NumericLiteral => {
lsp_types::SemanticTokenType::NUMBER
}