# python: Fix at sign decorator highlighting conflict with matrix multiplication at sign operator \(\#58077\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/250b6581b5b346855cccfb909839d47711cf910b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 250b6581b5b346855cccfb909839d47711cf910b

Requested commit: 250b6581b5b346855cccfb909839d47711cf910b

Commit: 250b6581b5b346855cccfb909839d47711cf910b

Tree: feeb3d75841fee0bde1b2198a3a3421671e5e771

Author: Alex Lachance

Committer: GitHub

## Message

```
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>
```

## Parents

- [7960b2a7c9568e90fbe0727332149e5b2a5fd57a](https://git.cafe/gitcafe/zed/commit/7960b2a7c9568e90fbe0727332149e5b2a5fd57a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/250b6581b5b346855cccfb909839d47711cf910b?format=markdown)
