mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
913 B
Scheme
65 lines
913 B
Scheme
; Namespaces
|
|
|
|
(internal_module
|
|
[((identifier) @namespace) ((nested_identifier (identifier) @namespace))])
|
|
|
|
(ambient_declaration "global" @namespace)
|
|
|
|
|
|
; Variables
|
|
|
|
(required_parameter (identifier) @variable.parameter)
|
|
(optional_parameter (identifier) @variable.parameter)
|
|
|
|
; Punctuation
|
|
|
|
[
|
|
":"
|
|
] @punctuation.delimiter
|
|
|
|
(optional_parameter "?" @punctuation.special)
|
|
(property_signature "?" @punctuation.special)
|
|
|
|
(conditional_type ["?" ":"] @operator)
|
|
|
|
|
|
|
|
; Keywords
|
|
|
|
[
|
|
"abstract"
|
|
"declare"
|
|
"export"
|
|
"infer"
|
|
"implements"
|
|
"keyof"
|
|
"namespace"
|
|
] @keyword
|
|
|
|
[
|
|
"type"
|
|
"interface"
|
|
"enum"
|
|
] @keyword.storage.type
|
|
|
|
[
|
|
"public"
|
|
"private"
|
|
"protected"
|
|
"readonly"
|
|
] @keyword.storage.modifier
|
|
|
|
; inherits: ecma
|
|
|
|
; Types
|
|
|
|
(type_identifier) @type
|
|
(predefined_type) @type.builtin
|
|
|
|
(type_arguments
|
|
"<" @punctuation.bracket
|
|
">" @punctuation.bracket)
|
|
|
|
((identifier) @type
|
|
(#match? @type "^[A-Z]"))
|