From 7f868a2eff597be9e7db6a967ba6a5f987c3c5fc Mon Sep 17 00:00:00 2001 From: chbk Date: Mon, 5 May 2025 22:50:57 +0200 Subject: [PATCH] Improve Rust macro highlighting (#28182) Release Notes: - Improved Rust macro highlighting | Zed 0.180.2 | With this PR | | --- | --- | | ![Image](https://github.com/user-attachments/assets/013c73b1-5eee-45b1-ba37-747563c1bc4b) | ![Image](https://github.com/user-attachments/assets/57eb97e3-1ccc-4d58-9596-bb3decedc0f4) | ```rust macro_rules! square { ($e:expr) => { $e * $e }; } ``` - `$var`: `variable` - `expr`: `type` --- crates/languages/src/rust/highlights.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm index 34380f0d3bf66943475c67da50ba0c23b01771fa..1c46061827cd504df669aadacd0a489172d1ce5a 100644 --- a/crates/languages/src/rust/highlights.scm +++ b/crates/languages/src/rust/highlights.scm @@ -1,5 +1,7 @@ (identifier) @variable +(metavariable) @variable (type_identifier) @type +(fragment_specifier) @type (primitive_type) @type.builtin (self) @variable.special (field_identifier) @property