fix(highlights): recognize !
as the never type (#12485)
Co-authored-by: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com>
This commit is contained in:
parent
b26903cd13
commit
8f5f818c88
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue