From 2dc4f156b387ccd4698fbf1a5e54ea7050b738ca Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 25 Aug 2025 11:51:31 -0400 Subject: [PATCH] Revert "Capture `shorthand_field_initializer` and modules in Rust highlights (#35842)" (#36880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR reverts https://github.com/zed-industries/zed/pull/35842, as it broke the syntax highlighting for `crate`: ### Before Revert Screenshot 2025-08-25 at 11 29 50 AM ### After Revert Screenshot 2025-08-25 at 11 32 17 AM This reverts commit 896a35f7befce468427a30489adf88c851b9507d. Release Notes: - Reverted https://github.com/zed-industries/zed/pull/35842. --- crates/languages/src/rust/highlights.scm | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm index 9c02fbedaa..1c46061827 100644 --- a/crates/languages/src/rust/highlights.scm +++ b/crates/languages/src/rust/highlights.scm @@ -6,9 +6,6 @@ (self) @variable.special (field_identifier) @property -(shorthand_field_initializer - (identifier) @property) - (trait_item name: (type_identifier) @type.interface) (impl_item trait: (type_identifier) @type.interface) (abstract_type trait: (type_identifier) @type.interface) @@ -41,20 +38,11 @@ (identifier) @function.special (scoped_identifier name: (identifier) @function.special) - ] - "!" @function.special) + ]) (macro_definition name: (identifier) @function.special.definition) -(mod_item - name: (identifier) @module) - -(visibility_modifier [ - (crate) @keyword - (super) @keyword -]) - ; Identifier conventions ; Assume uppercase names are types/enum-constructors @@ -127,7 +115,9 @@ "where" "while" "yield" + (crate) (mutable_specifier) + (super) ] @keyword [ @@ -199,7 +189,6 @@ operator: "/" @operator (lifetime) @lifetime -(lifetime (identifier) @lifetime) (parameter (identifier) @variable.parameter)