fix(highlights): recognize ! as the never type (#12485)

Co-authored-by: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com>
This commit is contained in:
Nikita Revenco 2025-01-11 16:49:39 +00:00 committed by GitHub
parent b26903cd13
commit 8f5f818c88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -311,6 +311,8 @@
((identifier) @type
(#match? @type "^[A-Z]"))
(never_type "!" @type)
; -------
; Functions
; -------
@ -453,6 +455,7 @@
; Remaining Identifiers
; -------
; We do not style ? as an operator on purpose as it allows styling ? differently, as many highlighters do. @operator.special might have been a better scope, but @special is already documented so the change would break themes (including the intent of the default theme)
"?" @special
(type_identifier) @type