languages: Reorder type identifier highlights in JavaScript (#49325)

Move general type identifier rules before class-specific ones to ensure
proper precedence in the syntax highlighting query.

Closes #49226.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed an issue where class names were not highlighted correctly in
JavaScript files
This commit is contained in:
Kunall Banerjee 2026-02-26 22:14:40 -05:00 committed by GitHub
parent 9ff0b0206f
commit 1c39e192f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,15 +120,15 @@
; Special identifiers
;
(type_identifier) @type
(predefined_type) @type.builtin
(class_declaration
(type_identifier) @type.class)
(extends_clause
value: (identifier) @type.class)
(type_identifier) @type
(predefined_type) @type.builtin
([
(identifier)
(shorthand_property_identifier)