on aef00a3 help sign in
helix/runtime/queries/rescript/highlights.scm
178 lines 2.1 kB history raw
1(comment) @comment
3; Identifiers
4;------------
6; Escaped identifiers like \"+."
7((value_identifier) @function.macro
8 (#match? @function.macro "^\\.*$"))
11 (type_identifier)
12 (unit_type)
13 "list"
14] @type
17 (variant_identifier)
18 (polyvar_identifier)
19] @constant
21(property_identifier) @variable.other.member
22(module_identifier) @namespace
24(jsx_identifier) @tag
25(jsx_attribute (property_identifier) @variable.parameter)
27; Parameters
28;----------------
30(list_pattern (value_identifier) @variable.parameter)
31(spread_pattern (value_identifier) @variable.parameter)
33; String literals
34;----------------
37 (string)
38 (template_string)
39] @string
41(template_substitution
42 "${" @punctuation.bracket
43 "}" @punctuation.bracket) @embedded
45(character) @constant.character
46(escape_sequence) @constant.character.escape
48; Other literals
49;---------------
52 (true)
53 (false)
54] @constant.builtin
56(number) @constant.numeric
57(polyvar) @constant
58(polyvar_string) @constant
60; Functions
61;----------
64 (formal_parameters (value_identifier))
65 (labeled_parameter (value_identifier))
66] @variable.parameter
68(function parameter: (value_identifier) @variable.parameter)
70; Meta
71;-----
74 "@"
75 "@@"
76 (decorator_identifier)
77] @label
79(extension_identifier) @keyword
80("%") @keyword
82; Misc
83;-----
85(subscript_expression index: (string) @variable.other.member)
86(polyvar_type_pattern "#" @constant)
89 ("include")
90 ("open")
91] @keyword
94 "as"
95 "export"
96 "external"
97 "let"
98 "module"
99 "mutable"
100 "private"
101 "rec"
102 "type"
103 "and"
104] @keyword
107 "if"
108 "else"
109 "switch"
110] @keyword
113 "exception"
114 "try"
115 "catch"
116 "raise"
117] @keyword
120 "."
121 ","
122 "|"
123] @punctuation.delimiter
126 "++"
127 "+"
128 "+."
129 "-"
130 "-."
131 "*"
132 "*."
133 "/"
134 "/."
135 "<"
136 "<="
137 "=="
138 "==="
139 "!"
140 "!="
141 "!=="
142 ">"
143 ">="
144 "&&"
145 "||"
146 "="
147 ":="
148 "->"
149 "|>"
150 ":>"
151 (uncurry)
152] @operator
155 "("
156 ")"
157 "{"
158 "}"
159 "["
160 "]"
161] @punctuation.bracket
163(polyvar_type
164 [
165 "["
166 "[>"
167 "[<"
168 "]"
169 ] @punctuation.bracket)
172 "~"
173 "?"
174 "=>"
175 "..."
176] @punctuation
178(ternary_expression ["?" ":"] @operator)