Improve C++ highlighting for sized type specifiers (#25362)

For consistency, sized type specifiers should be highlighted the same
way as primitive types, to make sure 'unsigned', 'int' and 'unsigned
int' are all the same color. [A previous
change](https://github.com/zed-industries/zed/pull/18016) moved
primitive types from `@keyword` to `@type`, and this PR adjusts the
sized type specifier to follow suit.

Before this change:


![image](https://github.com/user-attachments/assets/d0982ced-882f-4477-b716-f07ac4a72170)

After this change:


![image](https://github.com/user-attachments/assets/2fb6a7e7-061b-46e1-a4e3-e906e1e87bd8)

Release Notes:

- Improved C++ syntax highlighting for sized type specifiers.
This commit is contained in:
Arseny Kapoulkine 2025-02-21 13:57:57 -08:00 committed by GitHub
parent 8f40bcc86c
commit dabc35b257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,6 +69,7 @@
(auto) @type (auto) @type
(type_identifier) @type (type_identifier) @type
type :(primitive_type) @type.primitive type :(primitive_type) @type.primitive
(sized_type_specifier) @type.primitive
(requires_clause (requires_clause
constraint: (template_type constraint: (template_type
@ -131,7 +132,6 @@ type :(primitive_type) @type.primitive
"using" "using"
"virtual" "virtual"
"while" "while"
(sized_type_specifier)
(storage_class_specifier) (storage_class_specifier)
(type_qualifier) (type_qualifier)
] @keyword ] @keyword