python: Fix at sign decorator highlighting conflict with matrix multiplication at sign operator (#58077)
In the current Python Tree-sitter `highlight.scm`, the `@` used for
decorators (`@punctuation.special` rule) is incorrectly overridden by
the `@` used for matrix multiplication (`@operator` rule).
This PR updates the matrix multiplication highlight query so it only
applies in binary operator contexts, and it also removes a duplicate
`@punctuation.special` for the `@` decorator.
| Before | After |
|
:---------------------------------------------------------------------------------------------------------------------------------:
|
:--------------------------------------------------------------------------------------------------------------------------------:
|
| <img width="338" height="1056" alt="image"
src="https://github.com/user-attachments/assets/cdce1556-6f7d-4542-abca-bcb3e11b6629"
/>| <img width="380" height="1057" alt="image"
src="https://github.com/user-attachments/assets/f948413c-ad8a-4ccc-89c1-bbffbe2affda"
/>|
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fix Python at sign decorator highlighting conflict with matrix
multiplication at sign operator
---------
Co-authored-by: Finn Evers <finn@zed.dev>
250b6581b5Alex Lachance committed on 9/14/2026, 7:33:49 AM· committed by GitHubparent7960b2a