@codingame/monaco-vscode-dart-default-extension 1.81.8-next.1

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.
@@ -0,0 +1,530 @@
1
+ {
2
+ "information_for_contributors": [
3
+ "This file has been converted from https://github.com/dart-lang/dart-syntax-highlight/blob/master/grammars/dart.json",
4
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
+ "Once accepted there, we are happy to receive an update request."
6
+ ],
7
+ "version": "https://github.com/dart-lang/dart-syntax-highlight/commit/4670ad8a1f742ccfb122c2b01e588af78f3fc120",
8
+ "name": "Dart",
9
+ "scopeName": "source.dart",
10
+ "patterns": [
11
+ {
12
+ "name": "meta.preprocessor.script.dart",
13
+ "match": "^(#!.*)$"
14
+ },
15
+ {
16
+ "name": "meta.declaration.dart",
17
+ "begin": "^\\w*\\b(library|import|part of|part|export)\\b",
18
+ "beginCaptures": {
19
+ "0": {
20
+ "name": "keyword.other.import.dart"
21
+ }
22
+ },
23
+ "end": ";",
24
+ "endCaptures": {
25
+ "0": {
26
+ "name": "punctuation.terminator.dart"
27
+ }
28
+ },
29
+ "patterns": [
30
+ {
31
+ "include": "#strings"
32
+ },
33
+ {
34
+ "include": "#comments"
35
+ },
36
+ {
37
+ "name": "keyword.other.import.dart",
38
+ "match": "\\b(as|show|hide)\\b"
39
+ },
40
+ {
41
+ "name": "keyword.control.dart",
42
+ "match": "\\b(if)\\b"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "include": "#comments"
48
+ },
49
+ {
50
+ "include": "#punctuation"
51
+ },
52
+ {
53
+ "include": "#annotations"
54
+ },
55
+ {
56
+ "include": "#keywords"
57
+ },
58
+ {
59
+ "include": "#constants-and-special-vars"
60
+ },
61
+ {
62
+ "include": "#operators"
63
+ },
64
+ {
65
+ "include": "#strings"
66
+ }
67
+ ],
68
+ "repository": {
69
+ "dartdoc": {
70
+ "patterns": [
71
+ {
72
+ "match": "(\\[.*?\\])",
73
+ "captures": {
74
+ "0": {
75
+ "name": "variable.name.source.dart"
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "match": "^ {4,}(?![ \\*]).*",
81
+ "captures": {
82
+ "0": {
83
+ "name": "variable.name.source.dart"
84
+ }
85
+ }
86
+ },
87
+ {
88
+ "contentName": "variable.other.source.dart",
89
+ "begin": "```.*?$",
90
+ "end": "```"
91
+ },
92
+ {
93
+ "match": "(`.*?`)",
94
+ "captures": {
95
+ "0": {
96
+ "name": "variable.other.source.dart"
97
+ }
98
+ }
99
+ },
100
+ {
101
+ "match": "(`.*?`)",
102
+ "captures": {
103
+ "0": {
104
+ "name": "variable.other.source.dart"
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "match": "(\\* (( ).*))$",
110
+ "captures": {
111
+ "2": {
112
+ "name": "variable.other.source.dart"
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ "comments": {
119
+ "patterns": [
120
+ {
121
+ "name": "comment.block.empty.dart",
122
+ "match": "/\\*\\*/",
123
+ "captures": {
124
+ "0": {
125
+ "name": "punctuation.definition.comment.dart"
126
+ }
127
+ }
128
+ },
129
+ {
130
+ "include": "#comments-doc-oldschool"
131
+ },
132
+ {
133
+ "include": "#comments-doc"
134
+ },
135
+ {
136
+ "include": "#comments-inline"
137
+ }
138
+ ]
139
+ },
140
+ "comments-doc-oldschool": {
141
+ "patterns": [
142
+ {
143
+ "name": "comment.block.documentation.dart",
144
+ "begin": "/\\*\\*",
145
+ "end": "\\*/",
146
+ "patterns": [
147
+ {
148
+ "include": "#comments-doc-oldschool"
149
+ },
150
+ {
151
+ "include": "#comments-block"
152
+ },
153
+ {
154
+ "include": "#dartdoc"
155
+ }
156
+ ]
157
+ }
158
+ ]
159
+ },
160
+ "comments-doc": {
161
+ "patterns": [
162
+ {
163
+ "name": "comment.block.documentation.dart",
164
+ "begin": "///",
165
+ "while": "^\\s*///",
166
+ "patterns": [
167
+ {
168
+ "include": "#dartdoc"
169
+ }
170
+ ]
171
+ }
172
+ ]
173
+ },
174
+ "comments-inline": {
175
+ "patterns": [
176
+ {
177
+ "include": "#comments-block"
178
+ },
179
+ {
180
+ "match": "((//).*)$",
181
+ "captures": {
182
+ "1": {
183
+ "name": "comment.line.double-slash.dart"
184
+ }
185
+ }
186
+ }
187
+ ]
188
+ },
189
+ "comments-block": {
190
+ "patterns": [
191
+ {
192
+ "name": "comment.block.dart",
193
+ "begin": "/\\*",
194
+ "end": "\\*/",
195
+ "patterns": [
196
+ {
197
+ "include": "#comments-block"
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ },
203
+ "annotations": {
204
+ "patterns": [
205
+ {
206
+ "name": "storage.type.annotation.dart",
207
+ "match": "@[a-zA-Z]+"
208
+ }
209
+ ]
210
+ },
211
+ "constants-and-special-vars": {
212
+ "patterns": [
213
+ {
214
+ "name": "constant.language.dart",
215
+ "match": "(?<!\\$)\\b(true|false|null)\\b(?!\\$)"
216
+ },
217
+ {
218
+ "name": "variable.language.dart",
219
+ "match": "(?<!\\$)\\b(this|super)\\b(?!\\$)"
220
+ },
221
+ {
222
+ "name": "constant.numeric.dart",
223
+ "match": "(?<!\\$)\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)"
224
+ },
225
+ {
226
+ "include": "#class-identifier"
227
+ },
228
+ {
229
+ "include": "#function-identifier"
230
+ }
231
+ ]
232
+ },
233
+ "class-identifier": {
234
+ "patterns": [
235
+ {
236
+ "match": "(?<!\\$)\\b(bool|num|int|double|dynamic)\\b(?!\\$)",
237
+ "name": "support.class.dart"
238
+ },
239
+ {
240
+ "match": "(?<!\\$)\\bvoid\\b(?!\\$)",
241
+ "name": "storage.type.primitive.dart"
242
+ },
243
+ {
244
+ "begin": "(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*)\\b",
245
+ "end": "(?!<)",
246
+ "beginCaptures": {
247
+ "1": {
248
+ "name": "support.class.dart"
249
+ }
250
+ },
251
+ "patterns": [
252
+ {
253
+ "include": "#type-args"
254
+ }
255
+ ]
256
+ }
257
+ ]
258
+ },
259
+ "function-identifier": {
260
+ "patterns": [
261
+ {
262
+ "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(<(?:[a-zA-Z0-9_$<>?]|,\\s*|\\s+extends\\s+)+>)?[!?]?\\(",
263
+ "captures": {
264
+ "1": {
265
+ "name": "entity.name.function.dart"
266
+ },
267
+ "2": {
268
+ "patterns": [
269
+ {
270
+ "include": "#type-args"
271
+ }
272
+ ]
273
+ }
274
+ }
275
+ }
276
+ ]
277
+ },
278
+ "type-args": {
279
+ "begin": "(<)",
280
+ "end": "(>)",
281
+ "beginCaptures": {
282
+ "1": {
283
+ "name": "other.source.dart"
284
+ }
285
+ },
286
+ "endCaptures": {
287
+ "1": {
288
+ "name": "other.source.dart"
289
+ }
290
+ },
291
+ "patterns": [
292
+ {
293
+ "include": "#class-identifier"
294
+ },
295
+ {
296
+ "match": ","
297
+ },
298
+ {
299
+ "name": "keyword.declaration.dart",
300
+ "match": "extends"
301
+ },
302
+ {
303
+ "include": "#comments"
304
+ }
305
+ ]
306
+ },
307
+ "keywords": {
308
+ "patterns": [
309
+ {
310
+ "name": "keyword.cast.dart",
311
+ "match": "(?<!\\$)\\bas\\b(?!\\$)"
312
+ },
313
+ {
314
+ "name": "keyword.control.catch-exception.dart",
315
+ "match": "(?<!\\$)\\b(try|on|catch|finally|throw|rethrow)\\b(?!\\$)"
316
+ },
317
+ {
318
+ "name": "keyword.control.dart",
319
+ "match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while|when)\\b(?!\\$)"
320
+ },
321
+ {
322
+ "name": "keyword.control.dart",
323
+ "match": "(?<!\\$)\\b(sync(\\*)?|async(\\*)?|await|yield(\\*)?)\\b(?!\\$)"
324
+ },
325
+ {
326
+ "name": "keyword.control.dart",
327
+ "match": "(?<!\\$)\\bassert\\b(?!\\$)"
328
+ },
329
+ {
330
+ "name": "keyword.control.new.dart",
331
+ "match": "(?<!\\$)\\b(new)\\b(?!\\$)"
332
+ },
333
+ {
334
+ "name": "keyword.declaration.dart",
335
+ "match": "(?<!\\$)\\b(abstract|sealed|base|interface|inline class|class|enum|extends|extension|external|factory|implements|get(?!\\()|mixin|native|operator|set(?!\\()|typedef|with|covariant)\\b(?!\\$)"
336
+ },
337
+ {
338
+ "name": "storage.modifier.dart",
339
+ "match": "(?<!\\$)\\b(static|final|const|required|late)\\b(?!\\$)"
340
+ },
341
+ {
342
+ "name": "storage.type.primitive.dart",
343
+ "match": "(?<!\\$)\\b(?:void|var)\\b(?!\\$)"
344
+ }
345
+ ]
346
+ },
347
+ "operators": {
348
+ "patterns": [
349
+ {
350
+ "name": "keyword.operator.dart",
351
+ "match": "(?<!\\$)\\b(is\\!?)\\b(?!\\$)"
352
+ },
353
+ {
354
+ "name": "keyword.operator.ternary.dart",
355
+ "match": "\\?|:"
356
+ },
357
+ {
358
+ "name": "keyword.operator.bitwise.dart",
359
+ "match": "(<<|>>>?|~|\\^|\\||&)"
360
+ },
361
+ {
362
+ "name": "keyword.operator.assignment.bitwise.dart",
363
+ "match": "((&|\\^|\\||<<|>>>?)=)"
364
+ },
365
+ {
366
+ "name": "keyword.operator.closure.dart",
367
+ "match": "(=>)"
368
+ },
369
+ {
370
+ "name": "keyword.operator.comparison.dart",
371
+ "match": "(==|!=|<=?|>=?)"
372
+ },
373
+ {
374
+ "name": "keyword.operator.assignment.arithmetic.dart",
375
+ "match": "(([+*/%-]|\\~)=)"
376
+ },
377
+ {
378
+ "name": "keyword.operator.assignment.dart",
379
+ "match": "(=)"
380
+ },
381
+ {
382
+ "name": "keyword.operator.increment-decrement.dart",
383
+ "match": "(\\-\\-|\\+\\+)"
384
+ },
385
+ {
386
+ "name": "keyword.operator.arithmetic.dart",
387
+ "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)"
388
+ },
389
+ {
390
+ "name": "keyword.operator.logical.dart",
391
+ "match": "(!|&&|\\|\\|)"
392
+ }
393
+ ]
394
+ },
395
+ "string-interp": {
396
+ "patterns": [
397
+ {
398
+ "match": "\\$([a-zA-Z0-9_]+)",
399
+ "captures": {
400
+ "1": {
401
+ "name": "variable.parameter.dart"
402
+ }
403
+ }
404
+ },
405
+ {
406
+ "name": "string.interpolated.expression.dart",
407
+ "begin": "\\$\\{",
408
+ "end": "\\}",
409
+ "patterns": [
410
+ {
411
+ "include": "#constants-and-special-vars",
412
+ "name": "variable.parameter.dart"
413
+ },
414
+ {
415
+ "include": "#strings"
416
+ },
417
+ {
418
+ "name": "variable.parameter.dart",
419
+ "match": "[a-zA-Z0-9_]+"
420
+ }
421
+ ]
422
+ },
423
+ {
424
+ "name": "constant.character.escape.dart",
425
+ "match": "\\\\."
426
+ }
427
+ ]
428
+ },
429
+ "strings": {
430
+ "patterns": [
431
+ {
432
+ "name": "string.interpolated.triple.double.dart",
433
+ "begin": "(?<!r)\"\"\"",
434
+ "end": "\"\"\"(?!\")",
435
+ "patterns": [
436
+ {
437
+ "include": "#string-interp"
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "name": "string.interpolated.triple.single.dart",
443
+ "begin": "(?<!r)'''",
444
+ "end": "'''(?!')",
445
+ "patterns": [
446
+ {
447
+ "include": "#string-interp"
448
+ }
449
+ ]
450
+ },
451
+ {
452
+ "name": "string.quoted.triple.double.dart",
453
+ "begin": "r\"\"\"",
454
+ "end": "\"\"\"(?!\")"
455
+ },
456
+ {
457
+ "name": "string.quoted.triple.single.dart",
458
+ "begin": "r'''",
459
+ "end": "'''(?!')"
460
+ },
461
+ {
462
+ "name": "string.interpolated.double.dart",
463
+ "begin": "(?<!\\|r)\"",
464
+ "end": "\"",
465
+ "patterns": [
466
+ {
467
+ "name": "invalid.string.newline",
468
+ "match": "\\n"
469
+ },
470
+ {
471
+ "include": "#string-interp"
472
+ }
473
+ ]
474
+ },
475
+ {
476
+ "name": "string.quoted.double.dart",
477
+ "begin": "r\"",
478
+ "end": "\"",
479
+ "patterns": [
480
+ {
481
+ "name": "invalid.string.newline",
482
+ "match": "\\n"
483
+ }
484
+ ]
485
+ },
486
+ {
487
+ "name": "string.interpolated.single.dart",
488
+ "begin": "(?<!\\|r)'",
489
+ "end": "'",
490
+ "patterns": [
491
+ {
492
+ "name": "invalid.string.newline",
493
+ "match": "\\n"
494
+ },
495
+ {
496
+ "include": "#string-interp"
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ "name": "string.quoted.single.dart",
502
+ "begin": "r'",
503
+ "end": "'",
504
+ "patterns": [
505
+ {
506
+ "name": "invalid.string.newline",
507
+ "match": "\\n"
508
+ }
509
+ ]
510
+ }
511
+ ]
512
+ },
513
+ "punctuation": {
514
+ "patterns": [
515
+ {
516
+ "name": "punctuation.comma.dart",
517
+ "match": ","
518
+ },
519
+ {
520
+ "name": "punctuation.terminator.dart",
521
+ "match": ";"
522
+ },
523
+ {
524
+ "name": "punctuation.dot.dart",
525
+ "match": "\\."
526
+ }
527
+ ]
528
+ }
529
+ }
530
+ }
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import { registerExtension } from 'vscode/extensions';
2
+
3
+ var manifest = {name:"dart",displayName:"Dart Language Basics",description:"Provides syntax highlighting & bracket matching in Dart files.",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"0.10.x"},scripts:{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin dart-lang/dart-syntax-highlight grammars/dart.json ./syntaxes/dart.tmLanguage.json"},contributes:{languages:[{id:"dart",extensions:[".dart"],aliases:["Dart"],configuration:"./language-configuration.json"}],grammars:[{language:"dart",scopeName:"source.dart",path:"./syntaxes/dart.tmLanguage.json"}]},main:undefined};
4
+
5
+ const { registerFileUrl } = registerExtension(manifest);
6
+ registerFileUrl('./syntaxes/dart.tmLanguage.json', new URL('./dart.tmLanguage.json', import.meta.url).toString(), 'application/json');
7
+ registerFileUrl('./language-configuration.json', new URL('./language-configuration.json', import.meta.url).toString(), 'application/json');
@@ -0,0 +1,29 @@
1
+ {
2
+ "comments": {
3
+ "lineComment": "//",
4
+ "blockComment": [ "/*", "*/" ]
5
+ },
6
+ "brackets": [
7
+ ["{", "}"],
8
+ ["[", "]"],
9
+ ["(", ")"]
10
+ ],
11
+ "autoClosingPairs": [
12
+ { "open": "{", "close": "}" },
13
+ { "open": "[", "close": "]" },
14
+ { "open": "(", "close": ")" },
15
+ { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16
+ { "open": "\"", "close": "\"", "notIn": ["string"] },
17
+ { "open": "`", "close": "`", "notIn": ["string", "comment"] },
18
+ { "open": "/**", "close": " */", "notIn": ["string"] }
19
+ ],
20
+ "surroundingPairs": [
21
+ ["{", "}"],
22
+ ["[", "]"],
23
+ ["(", ")"],
24
+ ["<", ">"],
25
+ ["'", "'"],
26
+ ["\"", "\""],
27
+ ["`", "`"]
28
+ ]
29
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-dart-default-extension",
3
+ "version": "1.81.8-next.1",
4
+ "keywords": [],
5
+ "author": {
6
+ "name": "CodinGame",
7
+ "url": "http://www.codingame.com"
8
+ },
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/CodinGame/monaco-vscode-api"
13
+ },
14
+ "type": "module",
15
+ "private": false,
16
+ "description": "Default VSCode extension designed to be used with @codingame/monaco-vscode-api",
17
+ "main": "index.js",
18
+ "module": "index.js",
19
+ "dependencies": {
20
+ "vscode": "npm:@codingame/monaco-vscode-api@1.81.8-next.1"
21
+ }
22
+ }