ts-wasms 1.0.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/LICENSE +21 -0
- package/README +2 -0
- package/out/bash/highlights.scm +56 -0
- package/out/bash/tree-sitter-bash.wasm +0 -0
- package/out/c/highlights.scm +81 -0
- package/out/c/tags.scm +9 -0
- package/out/c/tree-sitter-c.wasm +0 -0
- package/out/c-sharp/highlights.scm +213 -0
- package/out/c-sharp/tags.scm +23 -0
- package/out/c-sharp/tree-sitter-c_sharp.wasm +0 -0
- package/out/cpp/highlights.scm +70 -0
- package/out/cpp/injections.scm +3 -0
- package/out/cpp/tags.scm +15 -0
- package/out/cpp/tree-sitter-cpp.wasm +0 -0
- package/out/css/highlights.scm +76 -0
- package/out/css/tree-sitter-css.wasm +0 -0
- package/out/dart/folds.scm +8 -0
- package/out/dart/highlights.scm +224 -0
- package/out/dart/tree-sitter-dart.wasm +0 -0
- package/out/elisp/highlights.scm +72 -0
- package/out/elisp/tags.scm +5 -0
- package/out/elisp/tree-sitter-elisp.wasm +0 -0
- package/out/elixir/highlights.scm +223 -0
- package/out/elixir/injections.scm +55 -0
- package/out/elixir/tags.scm +54 -0
- package/out/elixir/tree-sitter-elixir.wasm +0 -0
- package/out/embedded-template/highlights.scm +12 -0
- package/out/embedded-template/injections-ejs.scm +7 -0
- package/out/embedded-template/injections-erb.scm +7 -0
- package/out/embedded-template/injections-etlua.scm +7 -0
- package/out/embedded-template/tree-sitter-embedded_template.wasm +0 -0
- package/out/go/highlights.scm +123 -0
- package/out/go/tags.scm +42 -0
- package/out/go/tree-sitter-go.wasm +0 -0
- package/out/haskell/highlights.scm +443 -0
- package/out/haskell/injections.scm +76 -0
- package/out/haskell/locals.scm +4 -0
- package/out/haskell/tree-sitter-haskell.wasm +0 -0
- package/out/html/highlights.scm +13 -0
- package/out/html/injections.scm +7 -0
- package/out/html/tree-sitter-html.wasm +0 -0
- package/out/java/highlights.scm +149 -0
- package/out/java/tags.scm +20 -0
- package/out/java/tree-sitter-java.wasm +0 -0
- package/out/javascript/highlights-jsx.scm +8 -0
- package/out/javascript/highlights-params.scm +12 -0
- package/out/javascript/highlights.scm +204 -0
- package/out/javascript/injections.scm +31 -0
- package/out/javascript/locals.scm +23 -0
- package/out/javascript/tags.scm +99 -0
- package/out/javascript/tree-sitter-javascript.wasm +0 -0
- package/out/json/highlights.scm +16 -0
- package/out/json/tree-sitter-json.wasm +0 -0
- package/out/kotlin/highlights.scm +380 -0
- package/out/kotlin/tree-sitter-kotlin.wasm +0 -0
- package/out/objc/folds.scm +20 -0
- package/out/objc/highlights.scm +216 -0
- package/out/objc/indents.scm +1 -0
- package/out/objc/injections.scm +10 -0
- package/out/objc/locals.scm +1 -0
- package/out/objc/tree-sitter-objc.wasm +0 -0
- package/out/php/tree-sitter-php.wasm +0 -0
- package/out/php_only/tree-sitter-php_only.wasm +0 -0
- package/out/python/highlights.scm +137 -0
- package/out/python/tags.scm +14 -0
- package/out/python/tree-sitter-python.wasm +0 -0
- package/out/regex/highlights.scm +63 -0
- package/out/regex/tree-sitter-regex.wasm +0 -0
- package/out/ruby/highlights.scm +154 -0
- package/out/ruby/locals.scm +27 -0
- package/out/ruby/tags.scm +64 -0
- package/out/ruby/tree-sitter-ruby.wasm +0 -0
- package/out/rust/highlights.scm +161 -0
- package/out/rust/injections.scm +9 -0
- package/out/rust/tags.scm +60 -0
- package/out/rust/tree-sitter-rust.wasm +0 -0
- package/out/scala/highlights.scm +260 -0
- package/out/scala/indents.scm +30 -0
- package/out/scala/locals.scm +30 -0
- package/out/scala/tags.scm +66 -0
- package/out/scala/tree-sitter-scala.wasm +0 -0
- package/out/swift/folds.scm +35 -0
- package/out/swift/highlights.scm +336 -0
- package/out/swift/indents.scm +123 -0
- package/out/swift/injections.scm +10 -0
- package/out/swift/locals.scm +23 -0
- package/out/swift/outline.scm +66 -0
- package/out/swift/tags.scm +51 -0
- package/out/swift/textobjects.scm +19 -0
- package/out/swift/tree-sitter-swift.wasm +0 -0
- package/out/tsx/tree-sitter-tsx.wasm +0 -0
- package/out/typescript/tree-sitter-typescript.wasm +0 -0
- package/out/vue/tree-sitter-vue.wasm +0 -0
- package/package.json +64 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
; CREDITS @stumash (stuart.mashaal@gmail.com)
|
|
2
|
+
|
|
3
|
+
(field_expression field: (identifier) @property)
|
|
4
|
+
(field_expression value: (identifier) @type
|
|
5
|
+
(#match? @type "^[A-Z]"))
|
|
6
|
+
|
|
7
|
+
(type_identifier) @type
|
|
8
|
+
|
|
9
|
+
(class_definition
|
|
10
|
+
name: (identifier) @type)
|
|
11
|
+
|
|
12
|
+
(enum_definition
|
|
13
|
+
name: (identifier) @type)
|
|
14
|
+
|
|
15
|
+
(object_definition
|
|
16
|
+
name: (identifier) @type)
|
|
17
|
+
|
|
18
|
+
(trait_definition
|
|
19
|
+
name: (identifier) @type)
|
|
20
|
+
|
|
21
|
+
(full_enum_case
|
|
22
|
+
name: (identifier) @type)
|
|
23
|
+
|
|
24
|
+
(simple_enum_case
|
|
25
|
+
name: (identifier) @type)
|
|
26
|
+
|
|
27
|
+
;; variables
|
|
28
|
+
|
|
29
|
+
(class_parameter
|
|
30
|
+
name: (identifier) @parameter)
|
|
31
|
+
|
|
32
|
+
(self_type (identifier) @parameter)
|
|
33
|
+
|
|
34
|
+
(interpolation (identifier) @none)
|
|
35
|
+
(interpolation (block) @none)
|
|
36
|
+
|
|
37
|
+
;; types
|
|
38
|
+
|
|
39
|
+
(type_definition
|
|
40
|
+
name: (type_identifier) @type.definition)
|
|
41
|
+
|
|
42
|
+
;; val/var definitions/declarations
|
|
43
|
+
|
|
44
|
+
(val_definition
|
|
45
|
+
pattern: (identifier) @variable)
|
|
46
|
+
|
|
47
|
+
(var_definition
|
|
48
|
+
pattern: (identifier) @variable)
|
|
49
|
+
|
|
50
|
+
(val_declaration
|
|
51
|
+
name: (identifier) @variable)
|
|
52
|
+
|
|
53
|
+
(var_declaration
|
|
54
|
+
name: (identifier) @variable)
|
|
55
|
+
|
|
56
|
+
; imports/exports
|
|
57
|
+
|
|
58
|
+
(import_declaration
|
|
59
|
+
path: (identifier) @namespace)
|
|
60
|
+
((stable_identifier (identifier) @namespace))
|
|
61
|
+
|
|
62
|
+
((import_declaration
|
|
63
|
+
path: (identifier) @type) (#match? @type "^[A-Z]"))
|
|
64
|
+
((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
|
|
65
|
+
|
|
66
|
+
(export_declaration
|
|
67
|
+
path: (identifier) @namespace)
|
|
68
|
+
((stable_identifier (identifier) @namespace))
|
|
69
|
+
|
|
70
|
+
((export_declaration
|
|
71
|
+
path: (identifier) @type) (#match? @type "^[A-Z]"))
|
|
72
|
+
((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
|
|
73
|
+
|
|
74
|
+
((namespace_selectors (identifier) @type) (#match? @type "^[A-Z]"))
|
|
75
|
+
|
|
76
|
+
; method invocation
|
|
77
|
+
|
|
78
|
+
(call_expression
|
|
79
|
+
function: (identifier) @function.call)
|
|
80
|
+
|
|
81
|
+
(call_expression
|
|
82
|
+
function: (operator_identifier) @function.call)
|
|
83
|
+
|
|
84
|
+
(call_expression
|
|
85
|
+
function: (field_expression
|
|
86
|
+
field: (identifier) @method.call))
|
|
87
|
+
|
|
88
|
+
((call_expression
|
|
89
|
+
function: (identifier) @constructor)
|
|
90
|
+
(#match? @constructor "^[A-Z]"))
|
|
91
|
+
|
|
92
|
+
(generic_function
|
|
93
|
+
function: (identifier) @function.call)
|
|
94
|
+
|
|
95
|
+
(interpolated_string_expression
|
|
96
|
+
interpolator: (identifier) @function.call)
|
|
97
|
+
|
|
98
|
+
; function definitions
|
|
99
|
+
|
|
100
|
+
(function_definition
|
|
101
|
+
name: (identifier) @function)
|
|
102
|
+
|
|
103
|
+
(parameter
|
|
104
|
+
name: (identifier) @parameter)
|
|
105
|
+
|
|
106
|
+
(binding
|
|
107
|
+
name: (identifier) @parameter)
|
|
108
|
+
|
|
109
|
+
; method definition
|
|
110
|
+
|
|
111
|
+
(function_declaration
|
|
112
|
+
name: (identifier) @method)
|
|
113
|
+
|
|
114
|
+
(function_definition
|
|
115
|
+
name: (identifier) @method)
|
|
116
|
+
|
|
117
|
+
; expressions
|
|
118
|
+
|
|
119
|
+
(infix_expression operator: (identifier) @operator)
|
|
120
|
+
(infix_expression operator: (operator_identifier) @operator)
|
|
121
|
+
(infix_type operator: (operator_identifier) @operator)
|
|
122
|
+
(infix_type operator: (operator_identifier) @operator)
|
|
123
|
+
|
|
124
|
+
; literals
|
|
125
|
+
|
|
126
|
+
(boolean_literal) @boolean
|
|
127
|
+
(integer_literal) @number
|
|
128
|
+
(floating_point_literal) @float
|
|
129
|
+
|
|
130
|
+
[
|
|
131
|
+
(string)
|
|
132
|
+
(character_literal)
|
|
133
|
+
(interpolated_string_expression)
|
|
134
|
+
] @string
|
|
135
|
+
|
|
136
|
+
(interpolation "$" @punctuation.special)
|
|
137
|
+
|
|
138
|
+
;; keywords
|
|
139
|
+
|
|
140
|
+
(opaque_modifier) @type.qualifier
|
|
141
|
+
(infix_modifier) @keyword
|
|
142
|
+
(transparent_modifier) @type.qualifier
|
|
143
|
+
(open_modifier) @type.qualifier
|
|
144
|
+
|
|
145
|
+
[
|
|
146
|
+
"case"
|
|
147
|
+
"class"
|
|
148
|
+
"enum"
|
|
149
|
+
"extends"
|
|
150
|
+
"derives"
|
|
151
|
+
"finally"
|
|
152
|
+
;; `forSome` existential types not implemented yet
|
|
153
|
+
;; `macro` not implemented yet
|
|
154
|
+
"object"
|
|
155
|
+
"override"
|
|
156
|
+
"package"
|
|
157
|
+
"trait"
|
|
158
|
+
"type"
|
|
159
|
+
"val"
|
|
160
|
+
"var"
|
|
161
|
+
"with"
|
|
162
|
+
"given"
|
|
163
|
+
"using"
|
|
164
|
+
"end"
|
|
165
|
+
"implicit"
|
|
166
|
+
"extension"
|
|
167
|
+
"with"
|
|
168
|
+
] @keyword
|
|
169
|
+
|
|
170
|
+
[
|
|
171
|
+
"abstract"
|
|
172
|
+
"final"
|
|
173
|
+
"lazy"
|
|
174
|
+
"sealed"
|
|
175
|
+
"private"
|
|
176
|
+
"protected"
|
|
177
|
+
] @type.qualifier
|
|
178
|
+
|
|
179
|
+
(inline_modifier) @storageclass
|
|
180
|
+
|
|
181
|
+
(null_literal) @constant.builtin
|
|
182
|
+
|
|
183
|
+
(wildcard) @parameter
|
|
184
|
+
|
|
185
|
+
(annotation) @attribute
|
|
186
|
+
|
|
187
|
+
;; special keywords
|
|
188
|
+
|
|
189
|
+
"new" @keyword.operator
|
|
190
|
+
|
|
191
|
+
[
|
|
192
|
+
"else"
|
|
193
|
+
"if"
|
|
194
|
+
"match"
|
|
195
|
+
"then"
|
|
196
|
+
] @conditional
|
|
197
|
+
|
|
198
|
+
[
|
|
199
|
+
"("
|
|
200
|
+
")"
|
|
201
|
+
"["
|
|
202
|
+
"]"
|
|
203
|
+
"{"
|
|
204
|
+
"}"
|
|
205
|
+
] @punctuation.bracket
|
|
206
|
+
|
|
207
|
+
[
|
|
208
|
+
"."
|
|
209
|
+
","
|
|
210
|
+
] @punctuation.delimiter
|
|
211
|
+
|
|
212
|
+
[
|
|
213
|
+
"do"
|
|
214
|
+
"for"
|
|
215
|
+
"while"
|
|
216
|
+
"yield"
|
|
217
|
+
] @repeat
|
|
218
|
+
|
|
219
|
+
"def" @keyword.function
|
|
220
|
+
|
|
221
|
+
[
|
|
222
|
+
"=>"
|
|
223
|
+
"<-"
|
|
224
|
+
"@"
|
|
225
|
+
] @operator
|
|
226
|
+
|
|
227
|
+
["import" "export"] @include
|
|
228
|
+
|
|
229
|
+
[
|
|
230
|
+
"try"
|
|
231
|
+
"catch"
|
|
232
|
+
"throw"
|
|
233
|
+
] @exception
|
|
234
|
+
|
|
235
|
+
"return" @keyword.return
|
|
236
|
+
|
|
237
|
+
(comment) @spell @comment
|
|
238
|
+
(block_comment) @spell @comment
|
|
239
|
+
|
|
240
|
+
;; `case` is a conditional keyword in case_block
|
|
241
|
+
|
|
242
|
+
(case_block
|
|
243
|
+
(case_clause ("case") @conditional))
|
|
244
|
+
(indented_cases
|
|
245
|
+
(case_clause ("case") @conditional))
|
|
246
|
+
|
|
247
|
+
(operator_identifier) @operator
|
|
248
|
+
|
|
249
|
+
((identifier) @type (#match? @type "^[A-Z]"))
|
|
250
|
+
((identifier) @variable.builtin
|
|
251
|
+
(#match? @variable.builtin "^this$"))
|
|
252
|
+
|
|
253
|
+
(
|
|
254
|
+
(identifier) @function.builtin
|
|
255
|
+
(#match? @function.builtin "^super$")
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
;; Scala CLI using directives
|
|
259
|
+
(using_directive_key) @parameter
|
|
260
|
+
(using_directive_value) @string
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
; These indent queries adhere to nvim-tree-sytter syntax.
|
|
2
|
+
; See `nvim-tree-sitter-indentation-mod` vim help page.
|
|
3
|
+
|
|
4
|
+
[
|
|
5
|
+
(template_body)
|
|
6
|
+
(block)
|
|
7
|
+
(parameters)
|
|
8
|
+
(arguments)
|
|
9
|
+
(match_expression)
|
|
10
|
+
(splice_expression)
|
|
11
|
+
(import_declaration)
|
|
12
|
+
(function_definition)
|
|
13
|
+
(ERROR ":")
|
|
14
|
+
(ERROR "=")
|
|
15
|
+
("match")
|
|
16
|
+
(":")
|
|
17
|
+
("=")
|
|
18
|
+
] @indent.begin
|
|
19
|
+
|
|
20
|
+
(arguments ")" @indent.end)
|
|
21
|
+
|
|
22
|
+
"}" @indent.end
|
|
23
|
+
|
|
24
|
+
"end" @indent.end
|
|
25
|
+
|
|
26
|
+
[
|
|
27
|
+
")"
|
|
28
|
+
"]"
|
|
29
|
+
"}"
|
|
30
|
+
] @indent.branch
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
(template_body) @local.scope
|
|
2
|
+
(lambda_expression) @local.scope
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
(function_declaration
|
|
6
|
+
name: (identifier) @local.definition) @local.scope
|
|
7
|
+
|
|
8
|
+
(function_definition
|
|
9
|
+
name: (identifier) @local.definition)
|
|
10
|
+
|
|
11
|
+
(parameter
|
|
12
|
+
name: (identifier) @local.definition)
|
|
13
|
+
|
|
14
|
+
(binding
|
|
15
|
+
name: (identifier) @local.definition)
|
|
16
|
+
|
|
17
|
+
(val_definition
|
|
18
|
+
pattern: (identifier) @local.definition)
|
|
19
|
+
|
|
20
|
+
(var_definition
|
|
21
|
+
pattern: (identifier) @local.definition)
|
|
22
|
+
|
|
23
|
+
(val_declaration
|
|
24
|
+
name: (identifier) @local.definition)
|
|
25
|
+
|
|
26
|
+
(var_declaration
|
|
27
|
+
name: (identifier) @local.definition)
|
|
28
|
+
|
|
29
|
+
(identifier) @local.reference
|
|
30
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
; Definitions
|
|
2
|
+
|
|
3
|
+
(package_clause
|
|
4
|
+
name: (package_identifier) @name) @definition.module
|
|
5
|
+
|
|
6
|
+
(trait_definition
|
|
7
|
+
name: (identifier) @name) @definition.interface
|
|
8
|
+
|
|
9
|
+
(enum_definition
|
|
10
|
+
name: (identifier) @name) @definition.enum
|
|
11
|
+
|
|
12
|
+
(simple_enum_case
|
|
13
|
+
name: (identifier) @name) @definition.class
|
|
14
|
+
|
|
15
|
+
(full_enum_case
|
|
16
|
+
name: (identifier) @name) @definition.class
|
|
17
|
+
|
|
18
|
+
(class_definition
|
|
19
|
+
name: (identifier) @name) @definition.class
|
|
20
|
+
|
|
21
|
+
(object_definition
|
|
22
|
+
name: (identifier) @name) @definition.object
|
|
23
|
+
|
|
24
|
+
(function_definition
|
|
25
|
+
name: (identifier) @name) @definition.function
|
|
26
|
+
|
|
27
|
+
(val_definition
|
|
28
|
+
pattern: (identifier) @name) @definition.variable
|
|
29
|
+
|
|
30
|
+
(given_definition
|
|
31
|
+
name: (identifier) @name) @definition.variable
|
|
32
|
+
|
|
33
|
+
(var_definition
|
|
34
|
+
pattern: (identifier) @name) @definition.variable
|
|
35
|
+
|
|
36
|
+
(val_declaration
|
|
37
|
+
name: (identifier) @name) @definition.variable
|
|
38
|
+
|
|
39
|
+
(var_declaration
|
|
40
|
+
name: (identifier) @name) @definition.variable
|
|
41
|
+
|
|
42
|
+
(type_definition
|
|
43
|
+
name: (type_identifier) @name) @definition.type
|
|
44
|
+
|
|
45
|
+
(class_parameter
|
|
46
|
+
name: (identifier) @name) @definition.property
|
|
47
|
+
|
|
48
|
+
; References
|
|
49
|
+
|
|
50
|
+
(call_expression
|
|
51
|
+
(identifier) @name) @reference.call
|
|
52
|
+
|
|
53
|
+
(instance_expression
|
|
54
|
+
(type_identifier) @name) @reference.interface
|
|
55
|
+
|
|
56
|
+
(instance_expression
|
|
57
|
+
(generic_type
|
|
58
|
+
(type_identifier) @name)) @reference.interface
|
|
59
|
+
|
|
60
|
+
(extends_clause
|
|
61
|
+
(type_identifier) @name) @reference.class
|
|
62
|
+
|
|
63
|
+
(extends_clause
|
|
64
|
+
(generic_type
|
|
65
|
+
(type_identifier) @name)) @reference.class
|
|
66
|
+
|
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
; format-ignore
|
|
2
|
+
[
|
|
3
|
+
(protocol_body) ; protocol Foo { ... }
|
|
4
|
+
(class_body) ; class Foo { ... }
|
|
5
|
+
(enum_class_body) ; enum Foo { ... }
|
|
6
|
+
(function_body) ; func Foo (...) {...}
|
|
7
|
+
(computed_property) ; { ... }
|
|
8
|
+
|
|
9
|
+
(computed_getter) ; get { ... }
|
|
10
|
+
(computed_setter) ; set { ... }
|
|
11
|
+
|
|
12
|
+
(do_statement)
|
|
13
|
+
(if_statement)
|
|
14
|
+
(for_statement)
|
|
15
|
+
(switch_statement)
|
|
16
|
+
(while_statement)
|
|
17
|
+
(guard_statement)
|
|
18
|
+
(switch_entry)
|
|
19
|
+
|
|
20
|
+
(type_parameters) ; x<Foo>
|
|
21
|
+
(tuple_type) ; (...)
|
|
22
|
+
(array_type) ; [String]
|
|
23
|
+
(dictionary_type) ; [Foo: Bar]
|
|
24
|
+
|
|
25
|
+
(call_expression) ; callFunc(...)
|
|
26
|
+
(tuple_expression) ; ( foo + bar )
|
|
27
|
+
(array_literal) ; [ foo, bar ]
|
|
28
|
+
(dictionary_literal) ; [ foo: bar, x: y ]
|
|
29
|
+
(lambda_literal)
|
|
30
|
+
(willset_didset_block)
|
|
31
|
+
(willset_clause)
|
|
32
|
+
(didset_clause)
|
|
33
|
+
|
|
34
|
+
(import_declaration)+
|
|
35
|
+
] @fold
|