Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Capture `shorthand_field_initializer` and modules in Rust highlights (#35842)
Jonathan Andersson896a35f7befc
diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scmindex 1c46061827c..9c02fbedaa6 100644--- a/crates/languages/src/rust/highlights.scm+++ b/crates/languages/src/rust/highlights.scm@@ -6,6 +6,9 @@(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)@@ -38,11 +41,20 @@(identifier) @function.special(scoped_identifiername: (identifier) @function.special)- ])+ ]+ "!" @function.special)(macro_definitionname: (identifier) @function.special.definition)+(mod_item+ name: (identifier) @module)++(visibility_modifier [+ (crate) @keyword+ (super) @keyword+])+; Identifier conventions; Assume uppercase names are types/enum-constructors@@ -115,9 +127,7 @@"where""while""yield"- (crate)(mutable_specifier)- (super)] @keyword[@@ -189,6 +199,7 @@operator: "/" @operator(lifetime) @lifetime+(lifetime (identifier) @lifetime)(parameter (identifier) @variable.parameter)