skydive-cli 0.3.0 → 0.4.0
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/CHANGELOG.md +27 -0
- package/README.md +28 -2
- package/dist/js/billing-blocked-CwfG1BTR.mjs +71 -0
- package/dist/js/billing-blocked-euid6MN9.mjs +4 -0
- package/dist/js/bin.mjs +247 -89
- package/dist/js/{boot-HAgDg_b4.mjs → boot-on5ucI_Z.mjs} +228 -50
- package/dist/js/chat/tui/chunks/grammars/assets/bash.highlights.scm +56 -0
- package/dist/js/chat/tui/chunks/grammars/assets/bash.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/c.highlights.scm +81 -0
- package/dist/js/chat/tui/chunks/grammars/assets/c.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/cpp.highlights.scm +70 -0
- package/dist/js/chat/tui/chunks/grammars/assets/cpp.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/css.highlights.scm +76 -0
- package/dist/js/chat/tui/chunks/grammars/assets/css.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/go.highlights.scm +123 -0
- package/dist/js/chat/tui/chunks/grammars/assets/go.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/html.highlights.scm +13 -0
- package/dist/js/chat/tui/chunks/grammars/assets/html.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/java.highlights.scm +149 -0
- package/dist/js/chat/tui/chunks/grammars/assets/java.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/json.highlights.scm +16 -0
- package/dist/js/chat/tui/chunks/grammars/assets/json.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/lua.highlights.scm +201 -0
- package/dist/js/chat/tui/chunks/grammars/assets/lua.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/python.highlights.scm +137 -0
- package/dist/js/chat/tui/chunks/grammars/assets/python.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/ruby.highlights.scm +154 -0
- package/dist/js/chat/tui/chunks/grammars/assets/ruby.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/rust.highlights.scm +161 -0
- package/dist/js/chat/tui/chunks/grammars/assets/rust.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/toml.highlights.scm +53 -0
- package/dist/js/chat/tui/chunks/grammars/assets/toml.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/assets/yaml.highlights.scm +79 -0
- package/dist/js/chat/tui/chunks/grammars/assets/yaml.wasm +0 -0
- package/dist/js/chat/tui/chunks/grammars/grammars.ts +146 -0
- package/dist/js/{client-Dc7GZ3PG.mjs → client-CKzK-12y.mjs} +1 -1
- package/dist/js/client-D6apKmV0.mjs +6 -0
- package/dist/js/daemon-BADmpJAs.mjs +7 -0
- package/dist/js/{daemon-Co4CtpXZ.mjs → daemon-CaFz7Wtw.mjs} +2 -2
- package/dist/js/{install-CMYBFvR2.mjs → install-Ba-UTi-l.mjs} +2 -2
- package/dist/js/{print-CPCFci60.mjs → print-BXNq9UxE.mjs} +3 -2
- package/dist/js/{print-Cd-bVSEJ.mjs → print-X2N5wJ5l.mjs} +84 -2
- package/dist/js/{print-share-7qfpQtWK.mjs → print-share-D72CfWJk.mjs} +1 -1
- package/dist/js/{raw-pty-BcjbTjHJ.mjs → raw-pty-DAmb8uqt.mjs} +1 -1
- package/dist/js/raw-pty-t5DC-e1T.mjs +5 -0
- package/dist/js/rest-Br2eFTlj.mjs +5 -0
- package/dist/js/{rest-BlN_uWmL.mjs → rest-imDZZGQA.mjs} +10 -2
- package/package.json +1 -1
- package/dist/js/client-DuwxEDG4.mjs +0 -5
- package/dist/js/daemon-Ch_MSDmQ.mjs +0 -6
- package/dist/js/raw-pty-ChUHav4d.mjs +0 -5
- package/dist/js/rest-CDTXCmUb.mjs +0 -4
- /package/dist/js/{client-DfcJFEbh.mjs → client-D8s9vY4p.mjs} +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
; Keywords
|
|
2
|
+
"return" @keyword.return
|
|
3
|
+
|
|
4
|
+
[
|
|
5
|
+
"goto"
|
|
6
|
+
"in"
|
|
7
|
+
"local"
|
|
8
|
+
] @keyword
|
|
9
|
+
|
|
10
|
+
(label_statement) @label
|
|
11
|
+
|
|
12
|
+
(break_statement) @keyword
|
|
13
|
+
|
|
14
|
+
(do_statement
|
|
15
|
+
[
|
|
16
|
+
"do"
|
|
17
|
+
"end"
|
|
18
|
+
] @keyword)
|
|
19
|
+
|
|
20
|
+
(while_statement
|
|
21
|
+
[
|
|
22
|
+
"while"
|
|
23
|
+
"do"
|
|
24
|
+
"end"
|
|
25
|
+
] @repeat)
|
|
26
|
+
|
|
27
|
+
(repeat_statement
|
|
28
|
+
[
|
|
29
|
+
"repeat"
|
|
30
|
+
"until"
|
|
31
|
+
] @repeat)
|
|
32
|
+
|
|
33
|
+
(if_statement
|
|
34
|
+
[
|
|
35
|
+
"if"
|
|
36
|
+
"elseif"
|
|
37
|
+
"else"
|
|
38
|
+
"then"
|
|
39
|
+
"end"
|
|
40
|
+
] @conditional)
|
|
41
|
+
|
|
42
|
+
(elseif_statement
|
|
43
|
+
[
|
|
44
|
+
"elseif"
|
|
45
|
+
"then"
|
|
46
|
+
"end"
|
|
47
|
+
] @conditional)
|
|
48
|
+
|
|
49
|
+
(else_statement
|
|
50
|
+
[
|
|
51
|
+
"else"
|
|
52
|
+
"end"
|
|
53
|
+
] @conditional)
|
|
54
|
+
|
|
55
|
+
(for_statement
|
|
56
|
+
[
|
|
57
|
+
"for"
|
|
58
|
+
"do"
|
|
59
|
+
"end"
|
|
60
|
+
] @repeat)
|
|
61
|
+
|
|
62
|
+
(function_declaration
|
|
63
|
+
[
|
|
64
|
+
"function"
|
|
65
|
+
"end"
|
|
66
|
+
] @keyword.function)
|
|
67
|
+
|
|
68
|
+
(function_definition
|
|
69
|
+
[
|
|
70
|
+
"function"
|
|
71
|
+
"end"
|
|
72
|
+
] @keyword.function)
|
|
73
|
+
|
|
74
|
+
; Operators
|
|
75
|
+
(binary_expression
|
|
76
|
+
operator: _ @operator)
|
|
77
|
+
|
|
78
|
+
(unary_expression
|
|
79
|
+
operator: _ @operator)
|
|
80
|
+
|
|
81
|
+
[
|
|
82
|
+
"and"
|
|
83
|
+
"not"
|
|
84
|
+
"or"
|
|
85
|
+
] @keyword.operator
|
|
86
|
+
|
|
87
|
+
; Punctuations
|
|
88
|
+
[
|
|
89
|
+
";"
|
|
90
|
+
":"
|
|
91
|
+
","
|
|
92
|
+
"."
|
|
93
|
+
] @punctuation.delimiter
|
|
94
|
+
|
|
95
|
+
; Brackets
|
|
96
|
+
[
|
|
97
|
+
"("
|
|
98
|
+
")"
|
|
99
|
+
"["
|
|
100
|
+
"]"
|
|
101
|
+
"{"
|
|
102
|
+
"}"
|
|
103
|
+
] @punctuation.bracket
|
|
104
|
+
|
|
105
|
+
; Variables
|
|
106
|
+
(identifier) @variable
|
|
107
|
+
|
|
108
|
+
((identifier) @variable.builtin
|
|
109
|
+
(#eq? @variable.builtin "self"))
|
|
110
|
+
|
|
111
|
+
(variable_list
|
|
112
|
+
(attribute
|
|
113
|
+
"<" @punctuation.bracket
|
|
114
|
+
(identifier) @attribute
|
|
115
|
+
">" @punctuation.bracket))
|
|
116
|
+
|
|
117
|
+
; Constants
|
|
118
|
+
((identifier) @constant
|
|
119
|
+
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
|
|
120
|
+
|
|
121
|
+
(vararg_expression) @constant
|
|
122
|
+
|
|
123
|
+
(nil) @constant.builtin
|
|
124
|
+
|
|
125
|
+
[
|
|
126
|
+
(false)
|
|
127
|
+
(true)
|
|
128
|
+
] @boolean
|
|
129
|
+
|
|
130
|
+
; Tables
|
|
131
|
+
(field
|
|
132
|
+
name: (identifier) @field)
|
|
133
|
+
|
|
134
|
+
(dot_index_expression
|
|
135
|
+
field: (identifier) @field)
|
|
136
|
+
|
|
137
|
+
(table_constructor
|
|
138
|
+
[
|
|
139
|
+
"{"
|
|
140
|
+
"}"
|
|
141
|
+
] @constructor)
|
|
142
|
+
|
|
143
|
+
; Functions
|
|
144
|
+
(parameters
|
|
145
|
+
(identifier) @parameter)
|
|
146
|
+
|
|
147
|
+
(function_declaration
|
|
148
|
+
name: [
|
|
149
|
+
(identifier) @function
|
|
150
|
+
(dot_index_expression
|
|
151
|
+
field: (identifier) @function)
|
|
152
|
+
])
|
|
153
|
+
|
|
154
|
+
(function_declaration
|
|
155
|
+
name: (method_index_expression
|
|
156
|
+
method: (identifier) @method))
|
|
157
|
+
|
|
158
|
+
(assignment_statement
|
|
159
|
+
(variable_list
|
|
160
|
+
.
|
|
161
|
+
name: [
|
|
162
|
+
(identifier) @function
|
|
163
|
+
(dot_index_expression
|
|
164
|
+
field: (identifier) @function)
|
|
165
|
+
])
|
|
166
|
+
(expression_list
|
|
167
|
+
.
|
|
168
|
+
value: (function_definition)))
|
|
169
|
+
|
|
170
|
+
(table_constructor
|
|
171
|
+
(field
|
|
172
|
+
name: (identifier) @function
|
|
173
|
+
value: (function_definition)))
|
|
174
|
+
|
|
175
|
+
(function_call
|
|
176
|
+
name: [
|
|
177
|
+
(identifier) @function.call
|
|
178
|
+
(dot_index_expression
|
|
179
|
+
field: (identifier) @function.call)
|
|
180
|
+
(method_index_expression
|
|
181
|
+
method: (identifier) @method.call)
|
|
182
|
+
])
|
|
183
|
+
|
|
184
|
+
(function_call
|
|
185
|
+
(identifier) @function.builtin
|
|
186
|
+
(#any-of? @function.builtin
|
|
187
|
+
; built-in functions in Lua 5.1
|
|
188
|
+
"assert" "collectgarbage" "dofile" "error" "getfenv" "getmetatable" "ipairs" "load" "loadfile"
|
|
189
|
+
"loadstring" "module" "next" "pairs" "pcall" "print" "rawequal" "rawget" "rawset" "require"
|
|
190
|
+
"select" "setfenv" "setmetatable" "tonumber" "tostring" "type" "unpack" "xpcall"))
|
|
191
|
+
|
|
192
|
+
; Others
|
|
193
|
+
(comment) @comment
|
|
194
|
+
|
|
195
|
+
(hash_bang_line) @preproc
|
|
196
|
+
|
|
197
|
+
(number) @number
|
|
198
|
+
|
|
199
|
+
(string) @string
|
|
200
|
+
|
|
201
|
+
(escape_sequence) @string.escape
|
|
Binary file
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
; Identifier naming conventions
|
|
2
|
+
|
|
3
|
+
(identifier) @variable
|
|
4
|
+
|
|
5
|
+
((identifier) @constructor
|
|
6
|
+
(#match? @constructor "^[A-Z]"))
|
|
7
|
+
|
|
8
|
+
((identifier) @constant
|
|
9
|
+
(#match? @constant "^[A-Z][A-Z_]*$"))
|
|
10
|
+
|
|
11
|
+
; Function calls
|
|
12
|
+
|
|
13
|
+
(decorator) @function
|
|
14
|
+
(decorator
|
|
15
|
+
(identifier) @function)
|
|
16
|
+
|
|
17
|
+
(call
|
|
18
|
+
function: (attribute attribute: (identifier) @function.method))
|
|
19
|
+
(call
|
|
20
|
+
function: (identifier) @function)
|
|
21
|
+
|
|
22
|
+
; Builtin functions
|
|
23
|
+
|
|
24
|
+
((call
|
|
25
|
+
function: (identifier) @function.builtin)
|
|
26
|
+
(#match?
|
|
27
|
+
@function.builtin
|
|
28
|
+
"^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$"))
|
|
29
|
+
|
|
30
|
+
; Function definitions
|
|
31
|
+
|
|
32
|
+
(function_definition
|
|
33
|
+
name: (identifier) @function)
|
|
34
|
+
|
|
35
|
+
(attribute attribute: (identifier) @property)
|
|
36
|
+
(type (identifier) @type)
|
|
37
|
+
|
|
38
|
+
; Literals
|
|
39
|
+
|
|
40
|
+
[
|
|
41
|
+
(none)
|
|
42
|
+
(true)
|
|
43
|
+
(false)
|
|
44
|
+
] @constant.builtin
|
|
45
|
+
|
|
46
|
+
[
|
|
47
|
+
(integer)
|
|
48
|
+
(float)
|
|
49
|
+
] @number
|
|
50
|
+
|
|
51
|
+
(comment) @comment
|
|
52
|
+
(string) @string
|
|
53
|
+
(escape_sequence) @escape
|
|
54
|
+
|
|
55
|
+
(interpolation
|
|
56
|
+
"{" @punctuation.special
|
|
57
|
+
"}" @punctuation.special) @embedded
|
|
58
|
+
|
|
59
|
+
[
|
|
60
|
+
"-"
|
|
61
|
+
"-="
|
|
62
|
+
"!="
|
|
63
|
+
"*"
|
|
64
|
+
"**"
|
|
65
|
+
"**="
|
|
66
|
+
"*="
|
|
67
|
+
"/"
|
|
68
|
+
"//"
|
|
69
|
+
"//="
|
|
70
|
+
"/="
|
|
71
|
+
"&"
|
|
72
|
+
"&="
|
|
73
|
+
"%"
|
|
74
|
+
"%="
|
|
75
|
+
"^"
|
|
76
|
+
"^="
|
|
77
|
+
"+"
|
|
78
|
+
"->"
|
|
79
|
+
"+="
|
|
80
|
+
"<"
|
|
81
|
+
"<<"
|
|
82
|
+
"<<="
|
|
83
|
+
"<="
|
|
84
|
+
"<>"
|
|
85
|
+
"="
|
|
86
|
+
":="
|
|
87
|
+
"=="
|
|
88
|
+
">"
|
|
89
|
+
">="
|
|
90
|
+
">>"
|
|
91
|
+
">>="
|
|
92
|
+
"|"
|
|
93
|
+
"|="
|
|
94
|
+
"~"
|
|
95
|
+
"@="
|
|
96
|
+
"and"
|
|
97
|
+
"in"
|
|
98
|
+
"is"
|
|
99
|
+
"not"
|
|
100
|
+
"or"
|
|
101
|
+
"is not"
|
|
102
|
+
"not in"
|
|
103
|
+
] @operator
|
|
104
|
+
|
|
105
|
+
[
|
|
106
|
+
"as"
|
|
107
|
+
"assert"
|
|
108
|
+
"async"
|
|
109
|
+
"await"
|
|
110
|
+
"break"
|
|
111
|
+
"class"
|
|
112
|
+
"continue"
|
|
113
|
+
"def"
|
|
114
|
+
"del"
|
|
115
|
+
"elif"
|
|
116
|
+
"else"
|
|
117
|
+
"except"
|
|
118
|
+
"exec"
|
|
119
|
+
"finally"
|
|
120
|
+
"for"
|
|
121
|
+
"from"
|
|
122
|
+
"global"
|
|
123
|
+
"if"
|
|
124
|
+
"import"
|
|
125
|
+
"lambda"
|
|
126
|
+
"nonlocal"
|
|
127
|
+
"pass"
|
|
128
|
+
"print"
|
|
129
|
+
"raise"
|
|
130
|
+
"return"
|
|
131
|
+
"try"
|
|
132
|
+
"while"
|
|
133
|
+
"with"
|
|
134
|
+
"yield"
|
|
135
|
+
"match"
|
|
136
|
+
"case"
|
|
137
|
+
] @keyword
|
|
Binary file
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
(identifier) @variable
|
|
2
|
+
|
|
3
|
+
((identifier) @function.method
|
|
4
|
+
(#is-not? local))
|
|
5
|
+
|
|
6
|
+
[
|
|
7
|
+
"alias"
|
|
8
|
+
"and"
|
|
9
|
+
"begin"
|
|
10
|
+
"break"
|
|
11
|
+
"case"
|
|
12
|
+
"class"
|
|
13
|
+
"def"
|
|
14
|
+
"do"
|
|
15
|
+
"else"
|
|
16
|
+
"elsif"
|
|
17
|
+
"end"
|
|
18
|
+
"ensure"
|
|
19
|
+
"for"
|
|
20
|
+
"if"
|
|
21
|
+
"in"
|
|
22
|
+
"module"
|
|
23
|
+
"next"
|
|
24
|
+
"or"
|
|
25
|
+
"rescue"
|
|
26
|
+
"retry"
|
|
27
|
+
"return"
|
|
28
|
+
"then"
|
|
29
|
+
"unless"
|
|
30
|
+
"until"
|
|
31
|
+
"when"
|
|
32
|
+
"while"
|
|
33
|
+
"yield"
|
|
34
|
+
] @keyword
|
|
35
|
+
|
|
36
|
+
((identifier) @keyword
|
|
37
|
+
(#match? @keyword "^(private|protected|public)$"))
|
|
38
|
+
|
|
39
|
+
(constant) @constructor
|
|
40
|
+
|
|
41
|
+
; Function calls
|
|
42
|
+
|
|
43
|
+
"defined?" @function.method.builtin
|
|
44
|
+
|
|
45
|
+
(call
|
|
46
|
+
method: [(identifier) (constant)] @function.method)
|
|
47
|
+
|
|
48
|
+
((identifier) @function.method.builtin
|
|
49
|
+
(#eq? @function.method.builtin "require"))
|
|
50
|
+
|
|
51
|
+
; Function definitions
|
|
52
|
+
|
|
53
|
+
(alias (identifier) @function.method)
|
|
54
|
+
(setter (identifier) @function.method)
|
|
55
|
+
(method name: [(identifier) (constant)] @function.method)
|
|
56
|
+
(singleton_method name: [(identifier) (constant)] @function.method)
|
|
57
|
+
|
|
58
|
+
; Identifiers
|
|
59
|
+
|
|
60
|
+
[
|
|
61
|
+
(class_variable)
|
|
62
|
+
(instance_variable)
|
|
63
|
+
] @property
|
|
64
|
+
|
|
65
|
+
((identifier) @constant.builtin
|
|
66
|
+
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
|
67
|
+
|
|
68
|
+
(file) @constant.builtin
|
|
69
|
+
(line) @constant.builtin
|
|
70
|
+
(encoding) @constant.builtin
|
|
71
|
+
|
|
72
|
+
(hash_splat_nil
|
|
73
|
+
"**" @operator) @constant.builtin
|
|
74
|
+
|
|
75
|
+
((constant) @constant
|
|
76
|
+
(#match? @constant "^[A-Z\\d_]+$"))
|
|
77
|
+
|
|
78
|
+
[
|
|
79
|
+
(self)
|
|
80
|
+
(super)
|
|
81
|
+
] @variable.builtin
|
|
82
|
+
|
|
83
|
+
(block_parameter (identifier) @variable.parameter)
|
|
84
|
+
(block_parameters (identifier) @variable.parameter)
|
|
85
|
+
(destructured_parameter (identifier) @variable.parameter)
|
|
86
|
+
(hash_splat_parameter (identifier) @variable.parameter)
|
|
87
|
+
(lambda_parameters (identifier) @variable.parameter)
|
|
88
|
+
(method_parameters (identifier) @variable.parameter)
|
|
89
|
+
(splat_parameter (identifier) @variable.parameter)
|
|
90
|
+
|
|
91
|
+
(keyword_parameter name: (identifier) @variable.parameter)
|
|
92
|
+
(optional_parameter name: (identifier) @variable.parameter)
|
|
93
|
+
|
|
94
|
+
; Literals
|
|
95
|
+
|
|
96
|
+
[
|
|
97
|
+
(string)
|
|
98
|
+
(bare_string)
|
|
99
|
+
(subshell)
|
|
100
|
+
(heredoc_body)
|
|
101
|
+
(heredoc_beginning)
|
|
102
|
+
] @string
|
|
103
|
+
|
|
104
|
+
[
|
|
105
|
+
(simple_symbol)
|
|
106
|
+
(delimited_symbol)
|
|
107
|
+
(hash_key_symbol)
|
|
108
|
+
(bare_symbol)
|
|
109
|
+
] @string.special.symbol
|
|
110
|
+
|
|
111
|
+
(regex) @string.special.regex
|
|
112
|
+
(escape_sequence) @escape
|
|
113
|
+
|
|
114
|
+
[
|
|
115
|
+
(integer)
|
|
116
|
+
(float)
|
|
117
|
+
] @number
|
|
118
|
+
|
|
119
|
+
[
|
|
120
|
+
(nil)
|
|
121
|
+
(true)
|
|
122
|
+
(false)
|
|
123
|
+
] @constant.builtin
|
|
124
|
+
|
|
125
|
+
(interpolation
|
|
126
|
+
"#{" @punctuation.special
|
|
127
|
+
"}" @punctuation.special) @embedded
|
|
128
|
+
|
|
129
|
+
(comment) @comment
|
|
130
|
+
|
|
131
|
+
; Operators
|
|
132
|
+
|
|
133
|
+
[
|
|
134
|
+
"="
|
|
135
|
+
"=>"
|
|
136
|
+
"->"
|
|
137
|
+
] @operator
|
|
138
|
+
|
|
139
|
+
[
|
|
140
|
+
","
|
|
141
|
+
";"
|
|
142
|
+
"."
|
|
143
|
+
] @punctuation.delimiter
|
|
144
|
+
|
|
145
|
+
[
|
|
146
|
+
"("
|
|
147
|
+
")"
|
|
148
|
+
"["
|
|
149
|
+
"]"
|
|
150
|
+
"{"
|
|
151
|
+
"}"
|
|
152
|
+
"%w("
|
|
153
|
+
"%i("
|
|
154
|
+
] @punctuation.bracket
|
|
Binary file
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
; Identifiers
|
|
2
|
+
|
|
3
|
+
(type_identifier) @type
|
|
4
|
+
(primitive_type) @type.builtin
|
|
5
|
+
(field_identifier) @property
|
|
6
|
+
|
|
7
|
+
; Identifier conventions
|
|
8
|
+
|
|
9
|
+
; Assume all-caps names are constants
|
|
10
|
+
((identifier) @constant
|
|
11
|
+
(#match? @constant "^[A-Z][A-Z\\d_]+$'"))
|
|
12
|
+
|
|
13
|
+
; Assume uppercase names are enum constructors
|
|
14
|
+
((identifier) @constructor
|
|
15
|
+
(#match? @constructor "^[A-Z]"))
|
|
16
|
+
|
|
17
|
+
; Assume that uppercase names in paths are types
|
|
18
|
+
((scoped_identifier
|
|
19
|
+
path: (identifier) @type)
|
|
20
|
+
(#match? @type "^[A-Z]"))
|
|
21
|
+
((scoped_identifier
|
|
22
|
+
path: (scoped_identifier
|
|
23
|
+
name: (identifier) @type))
|
|
24
|
+
(#match? @type "^[A-Z]"))
|
|
25
|
+
((scoped_type_identifier
|
|
26
|
+
path: (identifier) @type)
|
|
27
|
+
(#match? @type "^[A-Z]"))
|
|
28
|
+
((scoped_type_identifier
|
|
29
|
+
path: (scoped_identifier
|
|
30
|
+
name: (identifier) @type))
|
|
31
|
+
(#match? @type "^[A-Z]"))
|
|
32
|
+
|
|
33
|
+
; Assume all qualified names in struct patterns are enum constructors. (They're
|
|
34
|
+
; either that, or struct names; highlighting both as constructors seems to be
|
|
35
|
+
; the less glaring choice of error, visually.)
|
|
36
|
+
(struct_pattern
|
|
37
|
+
type: (scoped_type_identifier
|
|
38
|
+
name: (type_identifier) @constructor))
|
|
39
|
+
|
|
40
|
+
; Function calls
|
|
41
|
+
|
|
42
|
+
(call_expression
|
|
43
|
+
function: (identifier) @function)
|
|
44
|
+
(call_expression
|
|
45
|
+
function: (field_expression
|
|
46
|
+
field: (field_identifier) @function.method))
|
|
47
|
+
(call_expression
|
|
48
|
+
function: (scoped_identifier
|
|
49
|
+
"::"
|
|
50
|
+
name: (identifier) @function))
|
|
51
|
+
|
|
52
|
+
(generic_function
|
|
53
|
+
function: (identifier) @function)
|
|
54
|
+
(generic_function
|
|
55
|
+
function: (scoped_identifier
|
|
56
|
+
name: (identifier) @function))
|
|
57
|
+
(generic_function
|
|
58
|
+
function: (field_expression
|
|
59
|
+
field: (field_identifier) @function.method))
|
|
60
|
+
|
|
61
|
+
(macro_invocation
|
|
62
|
+
macro: (identifier) @function.macro
|
|
63
|
+
"!" @function.macro)
|
|
64
|
+
|
|
65
|
+
; Function definitions
|
|
66
|
+
|
|
67
|
+
(function_item (identifier) @function)
|
|
68
|
+
(function_signature_item (identifier) @function)
|
|
69
|
+
|
|
70
|
+
(line_comment) @comment
|
|
71
|
+
(block_comment) @comment
|
|
72
|
+
|
|
73
|
+
(line_comment (doc_comment)) @comment.documentation
|
|
74
|
+
(block_comment (doc_comment)) @comment.documentation
|
|
75
|
+
|
|
76
|
+
"(" @punctuation.bracket
|
|
77
|
+
")" @punctuation.bracket
|
|
78
|
+
"[" @punctuation.bracket
|
|
79
|
+
"]" @punctuation.bracket
|
|
80
|
+
"{" @punctuation.bracket
|
|
81
|
+
"}" @punctuation.bracket
|
|
82
|
+
|
|
83
|
+
(type_arguments
|
|
84
|
+
"<" @punctuation.bracket
|
|
85
|
+
">" @punctuation.bracket)
|
|
86
|
+
(type_parameters
|
|
87
|
+
"<" @punctuation.bracket
|
|
88
|
+
">" @punctuation.bracket)
|
|
89
|
+
|
|
90
|
+
"::" @punctuation.delimiter
|
|
91
|
+
":" @punctuation.delimiter
|
|
92
|
+
"." @punctuation.delimiter
|
|
93
|
+
"," @punctuation.delimiter
|
|
94
|
+
";" @punctuation.delimiter
|
|
95
|
+
|
|
96
|
+
(parameter (identifier) @variable.parameter)
|
|
97
|
+
|
|
98
|
+
(lifetime (identifier) @label)
|
|
99
|
+
|
|
100
|
+
"as" @keyword
|
|
101
|
+
"async" @keyword
|
|
102
|
+
"await" @keyword
|
|
103
|
+
"break" @keyword
|
|
104
|
+
"const" @keyword
|
|
105
|
+
"continue" @keyword
|
|
106
|
+
"default" @keyword
|
|
107
|
+
"dyn" @keyword
|
|
108
|
+
"else" @keyword
|
|
109
|
+
"enum" @keyword
|
|
110
|
+
"extern" @keyword
|
|
111
|
+
"fn" @keyword
|
|
112
|
+
"for" @keyword
|
|
113
|
+
"gen" @keyword
|
|
114
|
+
"if" @keyword
|
|
115
|
+
"impl" @keyword
|
|
116
|
+
"in" @keyword
|
|
117
|
+
"let" @keyword
|
|
118
|
+
"loop" @keyword
|
|
119
|
+
"macro_rules!" @keyword
|
|
120
|
+
"match" @keyword
|
|
121
|
+
"mod" @keyword
|
|
122
|
+
"move" @keyword
|
|
123
|
+
"pub" @keyword
|
|
124
|
+
"raw" @keyword
|
|
125
|
+
"ref" @keyword
|
|
126
|
+
"return" @keyword
|
|
127
|
+
"static" @keyword
|
|
128
|
+
"struct" @keyword
|
|
129
|
+
"trait" @keyword
|
|
130
|
+
"type" @keyword
|
|
131
|
+
"union" @keyword
|
|
132
|
+
"unsafe" @keyword
|
|
133
|
+
"use" @keyword
|
|
134
|
+
"where" @keyword
|
|
135
|
+
"while" @keyword
|
|
136
|
+
"yield" @keyword
|
|
137
|
+
(crate) @keyword
|
|
138
|
+
(mutable_specifier) @keyword
|
|
139
|
+
(use_list (self) @keyword)
|
|
140
|
+
(scoped_use_list (self) @keyword)
|
|
141
|
+
(scoped_identifier (self) @keyword)
|
|
142
|
+
(super) @keyword
|
|
143
|
+
|
|
144
|
+
(self) @variable.builtin
|
|
145
|
+
|
|
146
|
+
(char_literal) @string
|
|
147
|
+
(string_literal) @string
|
|
148
|
+
(raw_string_literal) @string
|
|
149
|
+
|
|
150
|
+
(boolean_literal) @constant.builtin
|
|
151
|
+
(integer_literal) @constant.builtin
|
|
152
|
+
(float_literal) @constant.builtin
|
|
153
|
+
|
|
154
|
+
(escape_sequence) @escape
|
|
155
|
+
|
|
156
|
+
(attribute_item) @attribute
|
|
157
|
+
(inner_attribute_item) @attribute
|
|
158
|
+
|
|
159
|
+
"*" @operator
|
|
160
|
+
"&" @operator
|
|
161
|
+
"'" @operator
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
; Properties
|
|
2
|
+
;-----------
|
|
3
|
+
|
|
4
|
+
(bare_key) @type
|
|
5
|
+
|
|
6
|
+
(quoted_key) @string
|
|
7
|
+
|
|
8
|
+
(pair
|
|
9
|
+
(bare_key)) @property
|
|
10
|
+
|
|
11
|
+
(pair
|
|
12
|
+
(dotted_key
|
|
13
|
+
(bare_key) @property))
|
|
14
|
+
|
|
15
|
+
; Literals
|
|
16
|
+
;---------
|
|
17
|
+
|
|
18
|
+
(boolean) @boolean
|
|
19
|
+
|
|
20
|
+
(comment) @comment
|
|
21
|
+
|
|
22
|
+
(string) @string
|
|
23
|
+
|
|
24
|
+
[
|
|
25
|
+
(integer)
|
|
26
|
+
(float)
|
|
27
|
+
] @number
|
|
28
|
+
|
|
29
|
+
[
|
|
30
|
+
(offset_date_time)
|
|
31
|
+
(local_date_time)
|
|
32
|
+
(local_date)
|
|
33
|
+
(local_time)
|
|
34
|
+
] @string.special
|
|
35
|
+
|
|
36
|
+
; Punctuation
|
|
37
|
+
;------------
|
|
38
|
+
|
|
39
|
+
[
|
|
40
|
+
"."
|
|
41
|
+
","
|
|
42
|
+
] @punctuation.delimiter
|
|
43
|
+
|
|
44
|
+
"=" @operator
|
|
45
|
+
|
|
46
|
+
[
|
|
47
|
+
"["
|
|
48
|
+
"]"
|
|
49
|
+
"[["
|
|
50
|
+
"]]"
|
|
51
|
+
"{"
|
|
52
|
+
"}"
|
|
53
|
+
] @punctuation.bracket
|
|
Binary file
|