From 2b369d7532ccd5129e6555c57dad3675000475fa Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Mon, 10 Nov 2025 19:41:14 +0100 Subject: [PATCH] rust: Explicitly capture lifetime identifier (#42372) Closes #42030 This matches what VSCode and basically also this capture does. However, the identifier capture was overridden by other captures, hence the need to be explicit here. | Before | After | | - | - | | Bildschirmfoto 2025-11-10 um 17 56
28 | Bildschirmfoto 2025-11-10 um 17
54 35 | Release Notes: - Improved lifetime highlighting in Rust using the `lifetime` capture. --- crates/languages/src/rust/highlights.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm index c541b5121784e3edb86f6d2e97b0666204d9f475..ea3935257648b31f666ea64c7c302644ab3eb24e 100644 --- a/crates/languages/src/rust/highlights.scm +++ b/crates/languages/src/rust/highlights.scm @@ -195,7 +195,9 @@ (unary_expression "!" @operator) operator: "/" @operator -(lifetime) @lifetime +(lifetime + "'" @lifetime + (identifier) @lifetime) (parameter (identifier) @variable.parameter)