ZIm/crates/languages
Jonathan Andersson 896a35f7be
Capture shorthand_field_initializer and modules in Rust highlights (#35842)
Currently shorthand field initializers are not captured the same way as
the full initializers, leading to awkward and mismatching highlighting.
This PR addresses this fact, in addition to capturing new highlights:
- Tags the `!` as part of a macro invocation.
- Tags the identifier part of a lifetime as `@lifetime`.
- Tag module definitions as a new capture group, `@module`.
- Shorthand initializers are now properly tagged as `@property`.

Here's what the current version of Zed looks like:

<img width="596" height="683" alt="image"
src="https://github.com/user-attachments/assets/c9e52d8e-03dc-426b-8545-4fe872b803e0"
/>

With the new highlighting applied:

<img width="596" height="683" alt="image"
src="https://github.com/user-attachments/assets/b7bd9391-9910-456b-8198-6871174d0f4f"
/>

Release Notes:

- Improved highlighting of Rust files, including new highlight groups
for modules and shorthand initializers.
2025-08-22 20:16:43 +00:00
..
src Capture shorthand_field_initializer and modules in Rust highlights (#35842) 2025-08-22 20:16:43 +00:00
Cargo.toml Verify downloaded rust-analyzer and clang binaries by checking the artifact digest (#35642) 2025-08-06 08:32:25 +00:00
LICENSE-GPL chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00