e033829ef27a704e6704d51f4915b48767545c63
Per https://github.com/zed-industries/zed/discussions/23371#discussioncomment-13533635, the issue is not new and I don't know how to solve the problem more holistically yet. All of the native themes don't have spec for `@diff.plus` and `@diff.minus` leaving addition and deletion not being highlighted. For diff file, the most valuable highlighting comes from exactly what we're missing. Hence, I think this is worth fixing. Perhaps, the ideal fix would be standardizing and documenting captures such as `@diff.plus` and `@diff.minus` on https://zed.dev/docs/extensions/languages#syntax-highlighting for theme writers to adopt. But the existing list of captures seems to be language-agnostic so I'm not sure if that's the best way forward. Per https://github.com/the-mikedavis/tree-sitter-diff/pull/18#issuecomment-2569785346, `tree-sitter-diff`'s author prefers using `@keyword` and `@string` so that `tree-sitter highlight` can work out of the box. So it seems to be an ok choice for Zed. Another approach is just adding `@diff.plus` and `@diff.minus` to the native themes. Let me know if I should pursue this instead. Before <img width="668" height="328" alt="Screenshot 2025-09-18 at 11 16 14 AM" src="https://github.com/user-attachments/assets/d9a5b3b5-b9ef-4e74-883f-831630fb431e" /> After <img width="1011" height="404" alt="Screenshot 2025-09-18 at 12 11 15 PM" src="https://github.com/user-attachments/assets/9cf453c0-30df-4d17-99e9-f2297865f12a" /> <img width="915" height="448" alt="Screenshot 2025-09-18 at 12 12 14 PM" src="https://github.com/user-attachments/assets/9e7438a6-9009-4136-b841-1f8e1356bc9b" /> Closes https://github.com/zed-industries/extensions/issues/490 Release Notes: - Fixed highlighting for addition and deletion for diff language --------- Co-authored-by: MrSubidubi <finn@zed.dev>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%