@harness-reins/linux-x64 0.13.3 → 0.14.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reins/ZELLIJ-LICENSE.md +21 -0
- package/dist/reins/_internal/harness_reins/_build.txt +1 -1
- package/dist/reins/_internal/lib-dynload/_asyncio.cpython-312-x86_64-linux-gnu.so +0 -0
- package/dist/reins/_internal/lib-dynload/_multiprocessing.cpython-312-x86_64-linux-gnu.so +0 -0
- package/dist/reins/_internal/lib-dynload/_posixshmem.cpython-312-x86_64-linux-gnu.so +0 -0
- package/dist/reins/_internal/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so +0 -0
- package/dist/reins/_internal/lib-dynload/mmap.cpython-312-x86_64-linux-gnu.so +0 -0
- package/dist/reins/_internal/textual/py.typed +0 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/bash.scm +56 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/css.scm +91 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/go.scm +123 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/html.scm +25 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/java.scm +142 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/javascript.scm +204 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/json.scm +32 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/markdown.scm +51 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/python.scm +313 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/regex.scm +50 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/rust.scm +155 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/sql.scm +444 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/toml.scm +36 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/xml.scm +168 -0
- package/dist/reins/_internal/textual/tree-sitter/highlights/yaml.scm +53 -0
- package/dist/reins/_internal/textual/widgets/__init__.pyi +43 -0
- package/dist/reins/_internal/textual-8.2.8.dist-info/INSTALLER +1 -0
- package/dist/reins/_internal/textual-8.2.8.dist-info/METADATA +266 -0
- package/dist/reins/_internal/textual-8.2.8.dist-info/RECORD +516 -0
- package/dist/reins/_internal/textual-8.2.8.dist-info/WHEEL +4 -0
- package/dist/reins/_internal/textual-8.2.8.dist-info/licenses/LICENSE +21 -0
- package/dist/reins/reins +0 -0
- package/dist/reins/zellij +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
(atx_heading (inline) @heading)
|
|
2
|
+
(setext_heading (paragraph) @heading)
|
|
3
|
+
|
|
4
|
+
[
|
|
5
|
+
(atx_h1_marker)
|
|
6
|
+
(atx_h2_marker)
|
|
7
|
+
(atx_h3_marker)
|
|
8
|
+
(atx_h4_marker)
|
|
9
|
+
(atx_h5_marker)
|
|
10
|
+
(atx_h6_marker)
|
|
11
|
+
(setext_h1_underline)
|
|
12
|
+
(setext_h2_underline)
|
|
13
|
+
] @heading.marker
|
|
14
|
+
|
|
15
|
+
[
|
|
16
|
+
(link_title)
|
|
17
|
+
(indented_code_block)
|
|
18
|
+
(fenced_code_block)
|
|
19
|
+
] @text.literal
|
|
20
|
+
|
|
21
|
+
[
|
|
22
|
+
(fenced_code_block_delimiter)
|
|
23
|
+
] @punctuation.delimiter
|
|
24
|
+
|
|
25
|
+
(code_fence_content) @none
|
|
26
|
+
|
|
27
|
+
[
|
|
28
|
+
(link_destination)
|
|
29
|
+
] @link.uri
|
|
30
|
+
|
|
31
|
+
[
|
|
32
|
+
(link_label)
|
|
33
|
+
] @link.label
|
|
34
|
+
|
|
35
|
+
[
|
|
36
|
+
(list_marker_plus)
|
|
37
|
+
(list_marker_minus)
|
|
38
|
+
(list_marker_star)
|
|
39
|
+
(list_marker_dot)
|
|
40
|
+
(list_marker_parenthesis)
|
|
41
|
+
(thematic_break)
|
|
42
|
+
] @list.marker
|
|
43
|
+
|
|
44
|
+
[
|
|
45
|
+
(block_continuation)
|
|
46
|
+
(block_quote_marker)
|
|
47
|
+
] @punctuation.special
|
|
48
|
+
|
|
49
|
+
[
|
|
50
|
+
(backslash_escape)
|
|
51
|
+
] @string.escape
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
;; From tree-sitter-python licensed under MIT License
|
|
2
|
+
; Copyright (c) 2016 Max Brunsfeld
|
|
3
|
+
; Adapted for Textual from:
|
|
4
|
+
; https://github.com/nvim-treesitter/nvim-treesitter/blob/f95ffd09ed35880c3a46ad2b968df361fa592a76/queries/python/highlights.scm
|
|
5
|
+
|
|
6
|
+
; Variables
|
|
7
|
+
(identifier) @variable
|
|
8
|
+
|
|
9
|
+
; Reset highlighting in f-string interpolations
|
|
10
|
+
(interpolation) @none
|
|
11
|
+
|
|
12
|
+
;; Identifier naming conventions
|
|
13
|
+
((identifier) @type
|
|
14
|
+
(#match? @type "^[A-Z].*[a-z]"))
|
|
15
|
+
((identifier) @constant
|
|
16
|
+
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
|
17
|
+
|
|
18
|
+
((attribute
|
|
19
|
+
attribute: (identifier) @field)
|
|
20
|
+
(#match? @field "^([A-Z])@!.*$"))
|
|
21
|
+
|
|
22
|
+
((identifier) @type.builtin
|
|
23
|
+
(#any-of? @type.builtin
|
|
24
|
+
;; https://docs.python.org/3/library/exceptions.html
|
|
25
|
+
"BaseException" "Exception" "ArithmeticError" "BufferError" "LookupError" "AssertionError" "AttributeError"
|
|
26
|
+
"EOFError" "FloatingPointError" "GeneratorExit" "ImportError" "ModuleNotFoundError" "IndexError" "KeyError"
|
|
27
|
+
"KeyboardInterrupt" "MemoryError" "NameError" "NotImplementedError" "OSError" "OverflowError" "RecursionError"
|
|
28
|
+
"ReferenceError" "RuntimeError" "StopIteration" "StopAsyncIteration" "SyntaxError" "IndentationError" "TabError"
|
|
29
|
+
"SystemError" "SystemExit" "TypeError" "UnboundLocalError" "UnicodeError" "UnicodeEncodeError" "UnicodeDecodeError"
|
|
30
|
+
"UnicodeTranslateError" "ValueError" "ZeroDivisionError" "EnvironmentError" "IOError" "WindowsError"
|
|
31
|
+
"BlockingIOError" "ChildProcessError" "ConnectionError" "BrokenPipeError" "ConnectionAbortedError"
|
|
32
|
+
"ConnectionRefusedError" "ConnectionResetError" "FileExistsError" "FileNotFoundError" "InterruptedError"
|
|
33
|
+
"IsADirectoryError" "NotADirectoryError" "PermissionError" "ProcessLookupError" "TimeoutError" "Warning"
|
|
34
|
+
"UserWarning" "DeprecationWarning" "PendingDeprecationWarning" "SyntaxWarning" "RuntimeWarning"
|
|
35
|
+
"FutureWarning" "ImportWarning" "UnicodeWarning" "BytesWarning" "ResourceWarning"
|
|
36
|
+
;; https://docs.python.org/3/library/stdtypes.html
|
|
37
|
+
"bool" "int" "float" "complex" "list" "tuple" "range" "str"
|
|
38
|
+
"bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type"))
|
|
39
|
+
|
|
40
|
+
((assignment
|
|
41
|
+
left: (identifier) @type.definition
|
|
42
|
+
(type (identifier) @_annotation))
|
|
43
|
+
(#eq? @_annotation "TypeAlias"))
|
|
44
|
+
|
|
45
|
+
((assignment
|
|
46
|
+
left: (identifier) @type.definition
|
|
47
|
+
right: (call
|
|
48
|
+
function: (identifier) @_func))
|
|
49
|
+
(#any-of? @_func "TypeVar" "NewType"))
|
|
50
|
+
|
|
51
|
+
; Function calls
|
|
52
|
+
|
|
53
|
+
(call
|
|
54
|
+
function: (identifier) @function.call)
|
|
55
|
+
|
|
56
|
+
(call
|
|
57
|
+
function: (attribute
|
|
58
|
+
attribute: (identifier) @method.call))
|
|
59
|
+
|
|
60
|
+
((call
|
|
61
|
+
function: (identifier) @constructor)
|
|
62
|
+
(#match? @constructor "^[A-Z]"))
|
|
63
|
+
|
|
64
|
+
((call
|
|
65
|
+
function: (attribute
|
|
66
|
+
attribute: (identifier) @constructor))
|
|
67
|
+
(#match? @constructor "^[A-Z]"))
|
|
68
|
+
|
|
69
|
+
;; Decorators
|
|
70
|
+
|
|
71
|
+
((decorator "@" @attribute)
|
|
72
|
+
(#set! "priority" 101))
|
|
73
|
+
|
|
74
|
+
(decorator
|
|
75
|
+
(identifier) @attribute)
|
|
76
|
+
(decorator
|
|
77
|
+
(attribute
|
|
78
|
+
attribute: (identifier) @attribute))
|
|
79
|
+
(decorator
|
|
80
|
+
(call (identifier) @attribute))
|
|
81
|
+
(decorator
|
|
82
|
+
(call (attribute
|
|
83
|
+
attribute: (identifier) @attribute)))
|
|
84
|
+
|
|
85
|
+
((decorator
|
|
86
|
+
(identifier) @attribute.builtin)
|
|
87
|
+
(#any-of? @attribute.builtin "classmethod" "property"))
|
|
88
|
+
|
|
89
|
+
;; Builtin functions
|
|
90
|
+
|
|
91
|
+
((call
|
|
92
|
+
function: (identifier) @function.builtin)
|
|
93
|
+
(#any-of? @function.builtin
|
|
94
|
+
"abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" "classmethod"
|
|
95
|
+
"compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" "filter" "float" "format"
|
|
96
|
+
"frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" "input" "int" "isinstance" "issubclass"
|
|
97
|
+
"iter" "len" "list" "locals" "map" "max" "memoryview" "min" "next" "object" "oct" "open" "ord" "pow"
|
|
98
|
+
"print" "property" "range" "repr" "reversed" "round" "set" "setattr" "slice" "sorted" "staticmethod" "str"
|
|
99
|
+
"sum" "super" "tuple" "type" "vars" "zip" "__import__"))
|
|
100
|
+
|
|
101
|
+
;; Function definitions
|
|
102
|
+
|
|
103
|
+
(function_definition
|
|
104
|
+
name: (identifier) @function)
|
|
105
|
+
|
|
106
|
+
(type (identifier) @type)
|
|
107
|
+
(type
|
|
108
|
+
(subscript
|
|
109
|
+
(identifier) @type)) ; type subscript: Tuple[int]
|
|
110
|
+
|
|
111
|
+
((call
|
|
112
|
+
function: (identifier) @_isinstance
|
|
113
|
+
arguments: (argument_list
|
|
114
|
+
(_)
|
|
115
|
+
(identifier) @type))
|
|
116
|
+
(#eq? @_isinstance "isinstance"))
|
|
117
|
+
|
|
118
|
+
;; Normal parameters
|
|
119
|
+
(parameters
|
|
120
|
+
(identifier) @parameter)
|
|
121
|
+
;; Lambda parameters
|
|
122
|
+
(lambda_parameters
|
|
123
|
+
(identifier) @parameter)
|
|
124
|
+
(lambda_parameters
|
|
125
|
+
(tuple_pattern
|
|
126
|
+
(identifier) @parameter))
|
|
127
|
+
; Default parameters
|
|
128
|
+
(keyword_argument
|
|
129
|
+
name: (identifier) @parameter)
|
|
130
|
+
; Naming parameters on call-site
|
|
131
|
+
(default_parameter
|
|
132
|
+
name: (identifier) @parameter)
|
|
133
|
+
(typed_parameter
|
|
134
|
+
(identifier) @parameter)
|
|
135
|
+
(typed_default_parameter
|
|
136
|
+
(identifier) @parameter)
|
|
137
|
+
; Variadic parameters *args, **kwargs
|
|
138
|
+
(parameters
|
|
139
|
+
(list_splat_pattern ; *args
|
|
140
|
+
(identifier) @parameter))
|
|
141
|
+
(parameters
|
|
142
|
+
(dictionary_splat_pattern ; **kwargs
|
|
143
|
+
(identifier) @parameter))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
;; Literals
|
|
147
|
+
|
|
148
|
+
(none) @constant.builtin
|
|
149
|
+
[(true) (false)] @boolean
|
|
150
|
+
((identifier) @variable.builtin
|
|
151
|
+
(#eq? @variable.builtin "self"))
|
|
152
|
+
((identifier) @variable.builtin
|
|
153
|
+
(#eq? @variable.builtin "cls"))
|
|
154
|
+
|
|
155
|
+
(integer) @number
|
|
156
|
+
(float) @float
|
|
157
|
+
|
|
158
|
+
(comment) @comment @spell
|
|
159
|
+
|
|
160
|
+
((module . (comment) @preproc)
|
|
161
|
+
(#match? @preproc "^#!/"))
|
|
162
|
+
|
|
163
|
+
(string) @string
|
|
164
|
+
(escape_sequence) @string.escape
|
|
165
|
+
|
|
166
|
+
; doc-strings
|
|
167
|
+
(expression_statement (string) @spell)
|
|
168
|
+
|
|
169
|
+
; Tokens
|
|
170
|
+
|
|
171
|
+
[
|
|
172
|
+
"-"
|
|
173
|
+
"-="
|
|
174
|
+
":="
|
|
175
|
+
"!="
|
|
176
|
+
"*"
|
|
177
|
+
"**"
|
|
178
|
+
"**="
|
|
179
|
+
"*="
|
|
180
|
+
"/"
|
|
181
|
+
"//"
|
|
182
|
+
"//="
|
|
183
|
+
"/="
|
|
184
|
+
"&"
|
|
185
|
+
"&="
|
|
186
|
+
"%"
|
|
187
|
+
"%="
|
|
188
|
+
"^"
|
|
189
|
+
"^="
|
|
190
|
+
"+"
|
|
191
|
+
"+="
|
|
192
|
+
"<"
|
|
193
|
+
"<<"
|
|
194
|
+
"<<="
|
|
195
|
+
"<="
|
|
196
|
+
"<>"
|
|
197
|
+
"="
|
|
198
|
+
"=="
|
|
199
|
+
">"
|
|
200
|
+
">="
|
|
201
|
+
">>"
|
|
202
|
+
">>="
|
|
203
|
+
"@"
|
|
204
|
+
"@="
|
|
205
|
+
"|"
|
|
206
|
+
"|="
|
|
207
|
+
"~"
|
|
208
|
+
"->"
|
|
209
|
+
] @operator
|
|
210
|
+
|
|
211
|
+
; Keywords
|
|
212
|
+
[
|
|
213
|
+
"and"
|
|
214
|
+
"in"
|
|
215
|
+
"is"
|
|
216
|
+
"not"
|
|
217
|
+
"or"
|
|
218
|
+
"del"
|
|
219
|
+
] @keyword.operator
|
|
220
|
+
|
|
221
|
+
[
|
|
222
|
+
"def"
|
|
223
|
+
"lambda"
|
|
224
|
+
] @keyword.function
|
|
225
|
+
|
|
226
|
+
[
|
|
227
|
+
"assert"
|
|
228
|
+
"async"
|
|
229
|
+
"await"
|
|
230
|
+
"class"
|
|
231
|
+
"exec"
|
|
232
|
+
"global"
|
|
233
|
+
"nonlocal"
|
|
234
|
+
"pass"
|
|
235
|
+
"print"
|
|
236
|
+
"with"
|
|
237
|
+
"as"
|
|
238
|
+
] @keyword
|
|
239
|
+
|
|
240
|
+
[
|
|
241
|
+
"return"
|
|
242
|
+
"yield"
|
|
243
|
+
] @keyword.return
|
|
244
|
+
(yield "from" @keyword.return)
|
|
245
|
+
|
|
246
|
+
(future_import_statement
|
|
247
|
+
"from" @include
|
|
248
|
+
"__future__" @constant.builtin)
|
|
249
|
+
(import_from_statement "from" @include)
|
|
250
|
+
"import" @include
|
|
251
|
+
|
|
252
|
+
(aliased_import "as" @include)
|
|
253
|
+
|
|
254
|
+
["if" "elif" "else" "match" "case"] @conditional
|
|
255
|
+
|
|
256
|
+
["for" "while" "break" "continue"] @repeat
|
|
257
|
+
|
|
258
|
+
[
|
|
259
|
+
"try"
|
|
260
|
+
"except"
|
|
261
|
+
"raise"
|
|
262
|
+
"finally"
|
|
263
|
+
] @exception
|
|
264
|
+
|
|
265
|
+
(raise_statement "from" @exception)
|
|
266
|
+
|
|
267
|
+
(try_statement
|
|
268
|
+
(else_clause
|
|
269
|
+
"else" @exception))
|
|
270
|
+
|
|
271
|
+
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
|
272
|
+
|
|
273
|
+
(interpolation
|
|
274
|
+
"{" @punctuation.special
|
|
275
|
+
"}" @punctuation.special)
|
|
276
|
+
|
|
277
|
+
["," "." ":" ";" (ellipsis)] @punctuation.delimiter
|
|
278
|
+
|
|
279
|
+
;; Class definitions
|
|
280
|
+
|
|
281
|
+
(class_definition name: (identifier) @type.class)
|
|
282
|
+
|
|
283
|
+
(class_definition
|
|
284
|
+
body: (block
|
|
285
|
+
(function_definition
|
|
286
|
+
name: (identifier) @method)))
|
|
287
|
+
|
|
288
|
+
(class_definition
|
|
289
|
+
superclasses: (argument_list
|
|
290
|
+
(identifier) @type))
|
|
291
|
+
|
|
292
|
+
((class_definition
|
|
293
|
+
body: (block
|
|
294
|
+
(expression_statement
|
|
295
|
+
(assignment
|
|
296
|
+
left: (identifier) @field))))
|
|
297
|
+
(#match? @field "^([A-Z])@!.*$"))
|
|
298
|
+
((class_definition
|
|
299
|
+
body: (block
|
|
300
|
+
(expression_statement
|
|
301
|
+
(assignment
|
|
302
|
+
left: (_
|
|
303
|
+
(identifier) @field)))))
|
|
304
|
+
(#match? @field "^([A-Z])@!.*$"))
|
|
305
|
+
|
|
306
|
+
((class_definition
|
|
307
|
+
(block
|
|
308
|
+
(function_definition
|
|
309
|
+
name: (identifier) @constructor)))
|
|
310
|
+
(#any-of? @constructor "__new__" "__init__"))
|
|
311
|
+
|
|
312
|
+
;; Error
|
|
313
|
+
(ERROR) @error
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[
|
|
2
|
+
"("
|
|
3
|
+
")"
|
|
4
|
+
"(?"
|
|
5
|
+
"(?:"
|
|
6
|
+
"(?<"
|
|
7
|
+
">"
|
|
8
|
+
"["
|
|
9
|
+
"]"
|
|
10
|
+
"{"
|
|
11
|
+
"}"
|
|
12
|
+
] @punctuation.bracket
|
|
13
|
+
|
|
14
|
+
(group_name) @property
|
|
15
|
+
|
|
16
|
+
[
|
|
17
|
+
(identity_escape)
|
|
18
|
+
(control_letter_escape)
|
|
19
|
+
(character_class_escape)
|
|
20
|
+
(control_escape)
|
|
21
|
+
(start_assertion)
|
|
22
|
+
(end_assertion)
|
|
23
|
+
(boundary_assertion)
|
|
24
|
+
(non_boundary_assertion)
|
|
25
|
+
] @escape
|
|
26
|
+
|
|
27
|
+
[
|
|
28
|
+
"*"
|
|
29
|
+
"+"
|
|
30
|
+
"?"
|
|
31
|
+
"|"
|
|
32
|
+
"="
|
|
33
|
+
"!"
|
|
34
|
+
] @operator
|
|
35
|
+
|
|
36
|
+
(count_quantifier
|
|
37
|
+
[
|
|
38
|
+
(decimal_digits) @number
|
|
39
|
+
"," @punctuation.delimiter
|
|
40
|
+
])
|
|
41
|
+
|
|
42
|
+
(character_class
|
|
43
|
+
[
|
|
44
|
+
"^" @operator
|
|
45
|
+
(class_range "-" @operator)
|
|
46
|
+
])
|
|
47
|
+
|
|
48
|
+
(class_character) @constant.character
|
|
49
|
+
|
|
50
|
+
(pattern_character) @string
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
; Identifier conventions
|
|
2
|
+
|
|
3
|
+
; Assume all-caps names are constants
|
|
4
|
+
((identifier) @constant
|
|
5
|
+
(#match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
|
6
|
+
|
|
7
|
+
; Assume that uppercase names in paths are types
|
|
8
|
+
((scoped_identifier
|
|
9
|
+
path: (identifier) @type)
|
|
10
|
+
(#match? @type "^[A-Z]"))
|
|
11
|
+
((scoped_identifier
|
|
12
|
+
path: (scoped_identifier
|
|
13
|
+
name: (identifier) @type))
|
|
14
|
+
(#match? @type "^[A-Z]"))
|
|
15
|
+
((scoped_type_identifier
|
|
16
|
+
path: (identifier) @type)
|
|
17
|
+
(#match? @type "^[A-Z]"))
|
|
18
|
+
((scoped_type_identifier
|
|
19
|
+
path: (scoped_identifier
|
|
20
|
+
name: (identifier) @type))
|
|
21
|
+
(#match? @type "^[A-Z]"))
|
|
22
|
+
|
|
23
|
+
; Assume other uppercase names are enum constructors
|
|
24
|
+
((identifier) @constructor
|
|
25
|
+
(#match? @constructor "^[A-Z]"))
|
|
26
|
+
|
|
27
|
+
; Assume all qualified names in struct patterns are enum constructors. (They're
|
|
28
|
+
; either that, or struct names; highlighting both as constructors seems to be
|
|
29
|
+
; the less glaring choice of error, visually.)
|
|
30
|
+
(struct_pattern
|
|
31
|
+
type: (scoped_type_identifier
|
|
32
|
+
name: (type_identifier) @constructor))
|
|
33
|
+
|
|
34
|
+
; Function calls
|
|
35
|
+
|
|
36
|
+
(call_expression
|
|
37
|
+
function: (identifier) @function)
|
|
38
|
+
(call_expression
|
|
39
|
+
function: (field_expression
|
|
40
|
+
field: (field_identifier) @function.method))
|
|
41
|
+
(call_expression
|
|
42
|
+
function: (scoped_identifier
|
|
43
|
+
"::"
|
|
44
|
+
name: (identifier) @function))
|
|
45
|
+
|
|
46
|
+
(generic_function
|
|
47
|
+
function: (identifier) @function)
|
|
48
|
+
(generic_function
|
|
49
|
+
function: (scoped_identifier
|
|
50
|
+
name: (identifier) @function))
|
|
51
|
+
(generic_function
|
|
52
|
+
function: (field_expression
|
|
53
|
+
field: (field_identifier) @function.method))
|
|
54
|
+
|
|
55
|
+
(macro_invocation
|
|
56
|
+
macro: (identifier) @function.macro
|
|
57
|
+
"!" @function.macro)
|
|
58
|
+
|
|
59
|
+
; Function definitions
|
|
60
|
+
|
|
61
|
+
(function_item (identifier) @function)
|
|
62
|
+
(function_signature_item (identifier) @function)
|
|
63
|
+
|
|
64
|
+
; Other identifiers
|
|
65
|
+
|
|
66
|
+
(type_identifier) @type
|
|
67
|
+
(primitive_type) @type.builtin
|
|
68
|
+
(field_identifier) @property
|
|
69
|
+
|
|
70
|
+
(line_comment) @comment
|
|
71
|
+
(block_comment) @comment
|
|
72
|
+
|
|
73
|
+
"(" @punctuation.bracket
|
|
74
|
+
")" @punctuation.bracket
|
|
75
|
+
"[" @punctuation.bracket
|
|
76
|
+
"]" @punctuation.bracket
|
|
77
|
+
"{" @punctuation.bracket
|
|
78
|
+
"}" @punctuation.bracket
|
|
79
|
+
|
|
80
|
+
(type_arguments
|
|
81
|
+
"<" @punctuation.bracket
|
|
82
|
+
">" @punctuation.bracket)
|
|
83
|
+
(type_parameters
|
|
84
|
+
"<" @punctuation.bracket
|
|
85
|
+
">" @punctuation.bracket)
|
|
86
|
+
|
|
87
|
+
"::" @punctuation.delimiter
|
|
88
|
+
":" @punctuation.delimiter
|
|
89
|
+
"." @punctuation.delimiter
|
|
90
|
+
"," @punctuation.delimiter
|
|
91
|
+
";" @punctuation.delimiter
|
|
92
|
+
|
|
93
|
+
(parameter (identifier) @variable.parameter)
|
|
94
|
+
|
|
95
|
+
(lifetime (identifier) @label)
|
|
96
|
+
|
|
97
|
+
"as" @keyword
|
|
98
|
+
"async" @keyword
|
|
99
|
+
"await" @keyword
|
|
100
|
+
"break" @keyword
|
|
101
|
+
"const" @keyword
|
|
102
|
+
"continue" @keyword
|
|
103
|
+
"default" @keyword
|
|
104
|
+
"dyn" @keyword
|
|
105
|
+
"else" @keyword
|
|
106
|
+
"enum" @keyword
|
|
107
|
+
"extern" @keyword
|
|
108
|
+
"fn" @keyword
|
|
109
|
+
"for" @keyword
|
|
110
|
+
"if" @keyword
|
|
111
|
+
"impl" @keyword
|
|
112
|
+
"in" @keyword
|
|
113
|
+
"let" @keyword
|
|
114
|
+
"loop" @keyword
|
|
115
|
+
"macro_rules!" @keyword
|
|
116
|
+
"match" @keyword
|
|
117
|
+
"mod" @keyword
|
|
118
|
+
"move" @keyword
|
|
119
|
+
"pub" @keyword
|
|
120
|
+
"ref" @keyword
|
|
121
|
+
"return" @keyword
|
|
122
|
+
"static" @keyword
|
|
123
|
+
"struct" @keyword
|
|
124
|
+
"trait" @keyword
|
|
125
|
+
"type" @keyword
|
|
126
|
+
"union" @keyword
|
|
127
|
+
"unsafe" @keyword
|
|
128
|
+
"use" @keyword
|
|
129
|
+
"where" @keyword
|
|
130
|
+
"while" @keyword
|
|
131
|
+
(crate) @keyword
|
|
132
|
+
(mutable_specifier) @keyword
|
|
133
|
+
(use_list (self) @keyword)
|
|
134
|
+
(scoped_use_list (self) @keyword)
|
|
135
|
+
(scoped_identifier (self) @keyword)
|
|
136
|
+
(super) @keyword
|
|
137
|
+
|
|
138
|
+
(self) @variable.builtin
|
|
139
|
+
|
|
140
|
+
(char_literal) @string
|
|
141
|
+
(string_literal) @string
|
|
142
|
+
(raw_string_literal) @string
|
|
143
|
+
|
|
144
|
+
(boolean_literal) @constant.builtin
|
|
145
|
+
(integer_literal) @constant.builtin
|
|
146
|
+
(float_literal) @constant.builtin
|
|
147
|
+
|
|
148
|
+
(escape_sequence) @escape
|
|
149
|
+
|
|
150
|
+
(attribute_item) @attribute
|
|
151
|
+
(inner_attribute_item) @attribute
|
|
152
|
+
|
|
153
|
+
"*" @operator
|
|
154
|
+
"&" @operator
|
|
155
|
+
"'" @operator
|