zenith-language 0.2.9 → 0.3.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/package.json +3 -3
- package/syntaxes/zenith.tmLanguage.json +231 -24
package/package.json
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"name": "zenith-language",
|
|
3
3
|
"displayName": "Zenith Language Support",
|
|
4
4
|
"description": "Syntax highlighting, IntelliSense, and editor support for Zenith Framework (.zen files)",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.3.0",
|
|
6
6
|
"publisher": "ZenithBuild",
|
|
7
7
|
"engines": {
|
|
8
8
|
"vscode": "^1.80.0"
|
|
9
9
|
},
|
|
10
10
|
"main": "./out/extension.js",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build:server": "cd ../
|
|
13
|
-
"compile": "esbuild src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node && cp ../
|
|
12
|
+
"build:server": "cd ../zenith-language-server && bun run build",
|
|
13
|
+
"compile": "bun x esbuild src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node && cp ../zenith-language-server/dist/server.js out/server.js",
|
|
14
14
|
"watch": "bun run compile -- --watch",
|
|
15
15
|
"build:marketplace": "bun run build:server && bun run compile && node scripts/build.js marketplace",
|
|
16
16
|
"build:openvsx": "bun run build:server && bun run compile && node scripts/build.js openvsx",
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
{
|
|
18
18
|
"include": "#style-tag"
|
|
19
19
|
},
|
|
20
|
+
{
|
|
21
|
+
"include": "#router-component-tag"
|
|
22
|
+
},
|
|
20
23
|
{
|
|
21
24
|
"include": "#component-tag"
|
|
22
25
|
},
|
|
@@ -99,6 +102,9 @@
|
|
|
99
102
|
{
|
|
100
103
|
"include": "#lifecycle-hooks"
|
|
101
104
|
},
|
|
105
|
+
{
|
|
106
|
+
"include": "#zenith-imports"
|
|
107
|
+
},
|
|
102
108
|
{
|
|
103
109
|
"include": "source.ts"
|
|
104
110
|
}
|
|
@@ -176,9 +182,62 @@
|
|
|
176
182
|
}
|
|
177
183
|
},
|
|
178
184
|
"lifecycle-hooks": {
|
|
179
|
-
"match": "\\b(zenOnMount|zenOnDestroy|zenOnUpdate|zenEffect|onMount|onDestroy|onUpdate)\\b",
|
|
185
|
+
"match": "\\b(zenOnMount|zenOnDestroy|zenOnUpdate|zenEffect|onMount|onDestroy|onUpdate|useRoute|useRouter)\\b",
|
|
180
186
|
"name": "support.function.lifecycle.zenith"
|
|
181
187
|
},
|
|
188
|
+
"zenith-imports": {
|
|
189
|
+
"match": "(['\"])(zenith(?:/[a-zA-Z-]+)?|zenith:[a-zA-Z-]+)\\1",
|
|
190
|
+
"captures": {
|
|
191
|
+
"0": {
|
|
192
|
+
"name": "string.quoted.module.zenith"
|
|
193
|
+
},
|
|
194
|
+
"2": {
|
|
195
|
+
"name": "support.module.zenith"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"router-component-tag": {
|
|
200
|
+
"patterns": [
|
|
201
|
+
{
|
|
202
|
+
"begin": "(<)(ZenLink)(?=\\s|/?>)",
|
|
203
|
+
"beginCaptures": {
|
|
204
|
+
"1": {
|
|
205
|
+
"name": "punctuation.definition.tag.begin.html.zenith"
|
|
206
|
+
},
|
|
207
|
+
"2": {
|
|
208
|
+
"name": "entity.name.tag.component.router.zenith support.class.component.zenith"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"end": "(/?>)",
|
|
212
|
+
"endCaptures": {
|
|
213
|
+
"1": {
|
|
214
|
+
"name": "punctuation.definition.tag.end.html.zenith"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"name": "meta.tag.component.router.start.zenith",
|
|
218
|
+
"patterns": [
|
|
219
|
+
{
|
|
220
|
+
"include": "#tag-attributes"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"match": "(</)(\\s*)(ZenLink)(\\s*)(>)",
|
|
226
|
+
"captures": {
|
|
227
|
+
"1": {
|
|
228
|
+
"name": "punctuation.definition.tag.begin.html.zenith"
|
|
229
|
+
},
|
|
230
|
+
"3": {
|
|
231
|
+
"name": "entity.name.tag.component.router.zenith support.class.component.zenith"
|
|
232
|
+
},
|
|
233
|
+
"5": {
|
|
234
|
+
"name": "punctuation.definition.tag.end.html.zenith"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"name": "meta.tag.component.router.end.zenith"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
182
241
|
"component-tag": {
|
|
183
242
|
"patterns": [
|
|
184
243
|
{
|
|
@@ -281,13 +340,19 @@
|
|
|
281
340
|
"tag-attributes": {
|
|
282
341
|
"patterns": [
|
|
283
342
|
{
|
|
284
|
-
"include": "#attribute-
|
|
343
|
+
"include": "#attribute-directive"
|
|
285
344
|
},
|
|
286
345
|
{
|
|
287
|
-
"include": "#attribute-event
|
|
346
|
+
"include": "#attribute-at-event"
|
|
288
347
|
},
|
|
289
348
|
{
|
|
290
|
-
"include": "#attribute-bind"
|
|
349
|
+
"include": "#attribute-reactive-bind"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"include": "#attribute-expression"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"include": "#attribute-event-handler"
|
|
291
356
|
},
|
|
292
357
|
{
|
|
293
358
|
"include": "#attribute-quoted"
|
|
@@ -297,16 +362,76 @@
|
|
|
297
362
|
}
|
|
298
363
|
]
|
|
299
364
|
},
|
|
300
|
-
"attribute-
|
|
301
|
-
"begin": "(
|
|
365
|
+
"attribute-directive": {
|
|
366
|
+
"begin": "(zen:(?:if|for|effect|show))\\s*(=)\\s*",
|
|
302
367
|
"beginCaptures": {
|
|
303
368
|
"1": {
|
|
304
|
-
"name": "
|
|
369
|
+
"name": "keyword.control.directive.zenith"
|
|
305
370
|
},
|
|
306
371
|
"2": {
|
|
307
372
|
"name": "punctuation.separator.key-value.html.zenith"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"end": "(?<=[\"'])|(?=\\s|/?>)",
|
|
376
|
+
"name": "meta.attribute.directive.zenith",
|
|
377
|
+
"patterns": [
|
|
378
|
+
{
|
|
379
|
+
"begin": "\"",
|
|
380
|
+
"beginCaptures": {
|
|
381
|
+
"0": {
|
|
382
|
+
"name": "punctuation.definition.string.begin.html.zenith"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"end": "\"",
|
|
386
|
+
"endCaptures": {
|
|
387
|
+
"0": {
|
|
388
|
+
"name": "punctuation.definition.string.end.html.zenith"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"name": "string.quoted.double.html.zenith",
|
|
392
|
+
"contentName": "source.ts.embedded.zenith",
|
|
393
|
+
"patterns": [
|
|
394
|
+
{
|
|
395
|
+
"include": "source.ts"
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"begin": "'",
|
|
401
|
+
"beginCaptures": {
|
|
402
|
+
"0": {
|
|
403
|
+
"name": "punctuation.definition.string.begin.html.zenith"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"end": "'",
|
|
407
|
+
"endCaptures": {
|
|
408
|
+
"0": {
|
|
409
|
+
"name": "punctuation.definition.string.end.html.zenith"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"name": "string.quoted.single.html.zenith",
|
|
413
|
+
"contentName": "source.ts.embedded.zenith",
|
|
414
|
+
"patterns": [
|
|
415
|
+
{
|
|
416
|
+
"include": "source.ts"
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"attribute-at-event": {
|
|
423
|
+
"begin": "(@)([a-zA-Z][a-zA-Z0-9]*)\\s*(=)\\s*(\\{)",
|
|
424
|
+
"beginCaptures": {
|
|
425
|
+
"1": {
|
|
426
|
+
"name": "punctuation.definition.event.zenith"
|
|
427
|
+
},
|
|
428
|
+
"2": {
|
|
429
|
+
"name": "entity.other.attribute-name.event.zenith"
|
|
308
430
|
},
|
|
309
431
|
"3": {
|
|
432
|
+
"name": "punctuation.separator.key-value.html.zenith"
|
|
433
|
+
},
|
|
434
|
+
"4": {
|
|
310
435
|
"name": "punctuation.section.embedded.begin.zenith"
|
|
311
436
|
}
|
|
312
437
|
},
|
|
@@ -316,7 +441,7 @@
|
|
|
316
441
|
"name": "punctuation.section.embedded.end.zenith"
|
|
317
442
|
}
|
|
318
443
|
},
|
|
319
|
-
"name": "meta.attribute.
|
|
444
|
+
"name": "meta.attribute.event.zenith",
|
|
320
445
|
"contentName": "source.ts.embedded.zenith",
|
|
321
446
|
"patterns": [
|
|
322
447
|
{
|
|
@@ -324,11 +449,91 @@
|
|
|
324
449
|
}
|
|
325
450
|
]
|
|
326
451
|
},
|
|
327
|
-
"attribute-
|
|
328
|
-
"begin": "(
|
|
452
|
+
"attribute-reactive-bind": {
|
|
453
|
+
"begin": "(:)([a-zA-Z_][a-zA-Z0-9_-]*)\\s*(=)\\s*",
|
|
329
454
|
"beginCaptures": {
|
|
330
455
|
"1": {
|
|
331
|
-
"name": "
|
|
456
|
+
"name": "punctuation.definition.reactive-bind.zenith"
|
|
457
|
+
},
|
|
458
|
+
"2": {
|
|
459
|
+
"name": "entity.other.attribute-name.reactive.zenith"
|
|
460
|
+
},
|
|
461
|
+
"3": {
|
|
462
|
+
"name": "punctuation.separator.key-value.html.zenith"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"end": "(?<=[\"'\\}])|(?=\\s|/?>)",
|
|
466
|
+
"name": "meta.attribute.reactive-bind.zenith",
|
|
467
|
+
"patterns": [
|
|
468
|
+
{
|
|
469
|
+
"begin": "\\{",
|
|
470
|
+
"beginCaptures": {
|
|
471
|
+
"0": {
|
|
472
|
+
"name": "punctuation.section.embedded.begin.zenith"
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"end": "\\}",
|
|
476
|
+
"endCaptures": {
|
|
477
|
+
"0": {
|
|
478
|
+
"name": "punctuation.section.embedded.end.zenith"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"contentName": "source.ts.embedded.zenith",
|
|
482
|
+
"patterns": [
|
|
483
|
+
{
|
|
484
|
+
"include": "source.ts"
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"begin": "\"",
|
|
490
|
+
"beginCaptures": {
|
|
491
|
+
"0": {
|
|
492
|
+
"name": "punctuation.definition.string.begin.html.zenith"
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
"end": "\"",
|
|
496
|
+
"endCaptures": {
|
|
497
|
+
"0": {
|
|
498
|
+
"name": "punctuation.definition.string.end.html.zenith"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"name": "string.quoted.double.html.zenith",
|
|
502
|
+
"contentName": "source.ts.embedded.zenith",
|
|
503
|
+
"patterns": [
|
|
504
|
+
{
|
|
505
|
+
"include": "source.ts"
|
|
506
|
+
}
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"begin": "'",
|
|
511
|
+
"beginCaptures": {
|
|
512
|
+
"0": {
|
|
513
|
+
"name": "punctuation.definition.string.begin.html.zenith"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"end": "'",
|
|
517
|
+
"endCaptures": {
|
|
518
|
+
"0": {
|
|
519
|
+
"name": "punctuation.definition.string.end.html.zenith"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
"name": "string.quoted.single.html.zenith",
|
|
523
|
+
"contentName": "source.ts.embedded.zenith",
|
|
524
|
+
"patterns": [
|
|
525
|
+
{
|
|
526
|
+
"include": "source.ts"
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
}
|
|
530
|
+
]
|
|
531
|
+
},
|
|
532
|
+
"attribute-expression": {
|
|
533
|
+
"begin": "([a-zA-Z_][a-zA-Z0-9_:-]*)\\s*(=)\\s*(\\{)",
|
|
534
|
+
"beginCaptures": {
|
|
535
|
+
"1": {
|
|
536
|
+
"name": "entity.other.attribute-name.html.zenith"
|
|
332
537
|
},
|
|
333
538
|
"2": {
|
|
334
539
|
"name": "punctuation.separator.key-value.html.zenith"
|
|
@@ -343,7 +548,7 @@
|
|
|
343
548
|
"name": "punctuation.section.embedded.end.zenith"
|
|
344
549
|
}
|
|
345
550
|
},
|
|
346
|
-
"name": "meta.attribute.
|
|
551
|
+
"name": "meta.attribute.expression.zenith",
|
|
347
552
|
"contentName": "source.ts.embedded.zenith",
|
|
348
553
|
"patterns": [
|
|
349
554
|
{
|
|
@@ -351,30 +556,32 @@
|
|
|
351
556
|
}
|
|
352
557
|
]
|
|
353
558
|
},
|
|
354
|
-
"attribute-
|
|
355
|
-
"begin": "(
|
|
559
|
+
"attribute-event-handler": {
|
|
560
|
+
"begin": "(on[A-Z][a-zA-Z]*|onclick|onchange|onsubmit|oninput|onkeydown|onkeyup|onmouseenter|onmouseleave)\\s*(=)\\s*(\\{)",
|
|
356
561
|
"beginCaptures": {
|
|
357
562
|
"1": {
|
|
358
|
-
"name": "
|
|
563
|
+
"name": "entity.other.attribute-name.event.html.zenith"
|
|
359
564
|
},
|
|
360
565
|
"2": {
|
|
361
|
-
"name": "entity.other.attribute-name.html.zenith"
|
|
362
|
-
},
|
|
363
|
-
"3": {
|
|
364
566
|
"name": "punctuation.separator.key-value.html.zenith"
|
|
365
567
|
},
|
|
366
|
-
"
|
|
367
|
-
"name": "punctuation.
|
|
568
|
+
"3": {
|
|
569
|
+
"name": "punctuation.section.embedded.begin.zenith"
|
|
368
570
|
}
|
|
369
571
|
},
|
|
370
|
-
"end": "(
|
|
572
|
+
"end": "(\\})",
|
|
371
573
|
"endCaptures": {
|
|
372
574
|
"1": {
|
|
373
|
-
"name": "punctuation.
|
|
575
|
+
"name": "punctuation.section.embedded.end.zenith"
|
|
374
576
|
}
|
|
375
577
|
},
|
|
376
|
-
"name": "meta.attribute.
|
|
377
|
-
"contentName": "
|
|
578
|
+
"name": "meta.attribute.event-handler.zenith",
|
|
579
|
+
"contentName": "source.ts.embedded.zenith",
|
|
580
|
+
"patterns": [
|
|
581
|
+
{
|
|
582
|
+
"include": "source.ts"
|
|
583
|
+
}
|
|
584
|
+
]
|
|
378
585
|
},
|
|
379
586
|
"attribute-quoted": {
|
|
380
587
|
"begin": "([a-zA-Z_:][a-zA-Z0-9_:-]*)\\s*(=)\\s*",
|