In the current Python Tree-sitter `highlights.scm`, exception (https://docs.python.org/3/library/exceptions.html) are highlighted under `@type.class` which is inconsistent compared to other editors (VS Code, Neovim, Helix). This PR adds `#any-of?` with a list of python's exceptions and highlight them under `@type.builtin`. | Before | After | | :---------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | | <img width="1237" height="1160" alt="image" src="https://github.com/user-attachments/assets/05e1ae34-7637-413a-9785-ad696c2bf751" /> | <img width="1237" height="1154" alt="image" src="https://github.com/user-attachments/assets/105c61ca-b6a7-4c26-acc8-3e300f044510" /> | 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: - Added the ability to stylize builtin python exceptions and warnings using the `type.class.builtin` syntax capture.
1 file changedLine totals unavailable