@lvce-editor/shared-process 0.14.0 → 0.14.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.
@@ -1,814 +1 @@
1
- [
2
- {
3
- "key": "ArrowDown",
4
- "command": "EditorCompletion.focusNext",
5
- "when": "focus.editorCompletions"
6
- },
7
- {
8
- "key": "ArrowUp",
9
- "command": "EditorCompletion.focusPrevious",
10
- "when": "focus.editorCompletions"
11
- },
12
- {
13
- "key": "Enter",
14
- "command": "EditorCompletion.selectCurrent",
15
- "when": "focus.editorCompletions"
16
- },
17
- {
18
- "key": "Escape",
19
- "command": "EditorCompletion.close",
20
- "when": "focus.editorCompletions"
21
- },
22
- {
23
- "key": "Escape",
24
- "command": "Viewlet.closeWidget",
25
- "when": "focus.FindWidget",
26
- "args": ["FindWidget"]
27
- },
28
- {
29
- "key": "ctrl+ArrowRight",
30
- "command": "Editor.cursorWordRight",
31
- "when": "focus.EditorText"
32
- },
33
- {
34
- "key": "ctrl+ArrowLeft",
35
- "command": "Editor.cursorWordLeft",
36
- "when": "focus.EditorText"
37
- },
38
- {
39
- "key": "alt+Backspace",
40
- "command": "Editor.deleteWordPartLeft",
41
- "when": "focus.EditorText"
42
- },
43
- {
44
- "key": "alt+Delete",
45
- "command": "Editor.deleteWordPartRight",
46
- "when": "focus.EditorText"
47
- },
48
- {
49
- "key": "ctrl+Backspace",
50
- "command": "Editor.deleteWordLeft",
51
- "when": "focus.EditorText"
52
- },
53
- {
54
- "key": "Enter",
55
- "command": "EditorRename.finish",
56
- "when": "focus.editorRename"
57
- },
58
- {
59
- "key": "Escape",
60
- "command": "EditorRename.abort",
61
- "when": "focus.editorRename"
62
- },
63
- {
64
- "key": "ctrl+Delete",
65
- "command": "Editor.deleteWordRight",
66
- "when": "focus.EditorText"
67
- },
68
- {
69
- "key": "ctrl+d",
70
- "command": "Editor.selectNextOccurrence",
71
- "when": "focus.EditorText"
72
- },
73
- {
74
- "key": "Tab",
75
- "command": "Editor.handleTab",
76
- "when": "focus.EditorText"
77
- },
78
- {
79
- "key": "shift+Tab",
80
- "command": "Editor.unindent",
81
- "when": "focus.EditorText"
82
- },
83
- {
84
- "key": "ctrl+[",
85
- "command": "Editor.indentLess",
86
- "when": "focus.EditorText"
87
- },
88
- {
89
- "key": "ctrl+]",
90
- "command": "Editor.indentMore",
91
- "when": "focus.EditorText"
92
- },
93
- {
94
- "key": "shift+ArrowLeft",
95
- "command": "Editor.selectCharacterLeft",
96
- "when": "focus.EditorText"
97
- },
98
- {
99
- "key": "ctrl+shift+ArrowLeft",
100
- "command": "Editor.selectWordLeft",
101
- "when": "focus.EditorText"
102
- },
103
- {
104
- "key": "shift+ArrowRight",
105
- "command": "Editor.selectCharacterRight",
106
- "when": "focus.EditorText"
107
- },
108
- {
109
- "key": "ctrl+shift+ArrowRight",
110
- "command": "Editor.selectWordRight",
111
- "when": "focus.EditorText"
112
- },
113
- {
114
- "key": "ctrl+l",
115
- "command": "Editor.selectLine",
116
- "when": "focus.EditorText"
117
- },
118
- {
119
- "key": "ctrl+shift+Backspace",
120
- "command": "Editor.deleteAllLeft",
121
- "when": "focus.EditorText"
122
- },
123
- {
124
- "key": "ctrl+shift+Delete",
125
- "command": "Editor.deleteAllRight",
126
- "when": "focus.EditorText"
127
- },
128
- {
129
- "key": "ctrl+s",
130
- "command": "Main.save"
131
- },
132
- {
133
- "key": "ctrl+b",
134
- "command": "Layout.toggleSideBar"
135
- },
136
- {
137
- "key": "ctrl+m",
138
- "command": "Layout.toggleActivityBar"
139
- },
140
- {
141
- "key": "ctrl+`",
142
- "command": "Layout.togglePanel",
143
- "args": ["Terminal"]
144
- },
145
- {
146
- "key": "ctrl+shift+m",
147
- "command": "ViewService.toggleView",
148
- "args": ["Output"]
149
- },
150
- {
151
- "key": "ctrl+Enter",
152
- "command": "Source Control.acceptInput",
153
- "when": "focus.sourceControlInput"
154
- },
155
- {
156
- "key": "ctrl+n",
157
- "command": "Explorer.newFile"
158
- },
159
- {
160
- "key": "ctrl+p",
161
- "command": "Viewlet.openWidget",
162
- "args": ["QuickPick", "file"]
163
- },
164
- {
165
- "key": "ctrl+shift+p",
166
- "command": "Viewlet.openWidget",
167
- "args": ["QuickPick", "everything"]
168
- },
169
- {
170
- "key": "F1",
171
- "command": "Viewlet.openWidget",
172
- "args": ["QuickPick", "everything"]
173
- },
174
- {
175
- "key": "Escape",
176
- "command": "Viewlet.closeWidget",
177
- "args": ["QuickPick"],
178
- "when": "focus.quickPickInput"
179
- },
180
- {
181
- "key": "ArrowUp",
182
- "command": "QuickPick.focusPrevious",
183
- "when": "focus.quickPickInput"
184
- },
185
- {
186
- "key": "ArrowDown",
187
- "command": "QuickPick.focusNext",
188
- "when": "focus.quickPickInput"
189
- },
190
- {
191
- "key": "PageUp",
192
- "command": "QuickPick.focusFirst",
193
- "when": "focus.quickPickInput"
194
- },
195
- {
196
- "key": "PageDown",
197
- "command": "QuickPick.focusLast",
198
- "when": "focus.quickPickInput"
199
- },
200
- {
201
- "key": "Enter",
202
- "command": "QuickPick.selectCurrentIndex",
203
- "when": "focus.quickPickInput"
204
- },
205
- {
206
- "key": "ctrl+shift+x",
207
- "command": "Focus.set",
208
- "args": ["Extensions"]
209
- },
210
- {
211
- "key": "ctrl+shift+g",
212
- "command": "Focus.set",
213
- "args": ["Source Control"]
214
- },
215
- {
216
- "key": "ctrl+shift+e",
217
- "command": "Focus.set",
218
- "args": ["Explorer"]
219
- },
220
- {
221
- "key": "ctrl+shift+f",
222
- "command": "Focus.set",
223
- "args": ["Search"]
224
- },
225
- {
226
- "key": "ctrl+shift+Y",
227
- "command": "Focus.set",
228
- "args": ["Debug Console"]
229
- },
230
- {
231
- "key": "ctrl+shift+m",
232
- "command": "Focus.set",
233
- "args": ["Problems"]
234
- },
235
- {
236
- "key": "ArrowRight",
237
- "command": "Explorer.handleArrowRight",
238
- "when": "focus.Explorer"
239
- },
240
- {
241
- "key": "ArrowLeft",
242
- "command": "Explorer.handleArrowLeft",
243
- "when": "focus.Explorer"
244
- },
245
- {
246
- "key": "Home",
247
- "command": "Explorer.focusFirst",
248
- "when": "focus.Explorer"
249
- },
250
- {
251
- "key": "End",
252
- "command": "Explorer.focusLast",
253
- "when": "focus.Explorer"
254
- },
255
- {
256
- "key": "ArrowUp",
257
- "command": "Explorer.focusPrevious",
258
- "when": "focus.Explorer"
259
- },
260
- {
261
- "key": "ArrowDown",
262
- "command": "Explorer.focusNext",
263
- "when": "focus.Explorer"
264
- },
265
- {
266
- "key": "shift+*",
267
- "command": "Explorer.expandAll",
268
- "when": "focus.Explorer"
269
- },
270
- {
271
- "key": "alt+ArrowRight",
272
- "command": "Explorer.expandRecursively",
273
- "when": "focus.Explorer"
274
- },
275
- {
276
- "key": "ctrl+ArrowLeft",
277
- "command": "Explorer.collapseAll",
278
- "when": "focus.Explorer"
279
- },
280
- {
281
- "key": "Home",
282
- "command": "Extensions.focusFirst",
283
- "when": "focus.Extensions"
284
- },
285
- {
286
- "key": "End",
287
- "command": "Extensions.focusLast",
288
- "when": "focus.Extensions"
289
- },
290
- {
291
- "key": "PageUp",
292
- "command": "Extensions.focusPreviousPage",
293
- "when": "focus.Extensions"
294
- },
295
- {
296
- "key": "PageDown",
297
- "command": "Extensions.focusNextPage",
298
- "when": "focus.Extensions"
299
- },
300
- {
301
- "key": "ArrowUp",
302
- "command": "Extensions.focusPrevious",
303
- "when": "focus.Extensions"
304
- },
305
- {
306
- "key": "ArrowDown",
307
- "command": "Extensions.focusNext",
308
- "when": "focus.Extensions"
309
- },
310
- {
311
- "key": "Space",
312
- "command": "Extensions.handleClickCurrentButKeepFocus",
313
- "when": "focus.Extensions"
314
- },
315
- {
316
- "key": "Enter",
317
- "command": "Extensions.handleClickCurrent",
318
- "when": "focus.Extensions"
319
- },
320
- {
321
- "key": "ctrl+Space",
322
- "command": "Extensions.toggleSuggest",
323
- "when": "focus.Extensions"
324
- },
325
- {
326
- "key": "F2",
327
- "command": "Explorer.rename",
328
- "when": "focus.Explorer"
329
- },
330
- {
331
- "key": "Escape",
332
- "command": "Explorer.cancelEdit",
333
- "when": "focus.ExplorerEditBox"
334
- },
335
- {
336
- "key": "Enter",
337
- "command": "Explorer.acceptEdit",
338
- "when": "focus.ExplorerEditBox"
339
- },
340
- {
341
- "key": "Delete",
342
- "command": "Explorer.removeDirent",
343
- "when": "focus.Explorer"
344
- },
345
- {
346
- "key": "Escape",
347
- "command": "Explorer.focusNone",
348
- "when": "focus.Explorer"
349
- },
350
- {
351
- "key": "Space",
352
- "command": "Explorer.handleClickCurrentButKeepFocus",
353
- "when": "focus.Explorer"
354
- },
355
- {
356
- "key": "Enter",
357
- "command": "Explorer.handleClickCurrent",
358
- "when": "focus.Explorer"
359
- },
360
- {
361
- "key": "Escape",
362
- "command": "Editor.cancelSelection",
363
- "when": "focus.EditorText"
364
- },
365
- {
366
- "key": "ctrl+z",
367
- "command": "Editor.undo",
368
- "when": "focus.EditorText"
369
- },
370
- {
371
- "key": "ctrl+,",
372
- "command": "Preferences.openSettingsJson"
373
- },
374
- {
375
- "key": "ArrowLeft",
376
- "command": "Editor.cursorLeft",
377
- "when": "focus.EditorText"
378
- },
379
- {
380
- "key": "ArrowRight",
381
- "command": "Editor.cursorRight",
382
- "when": "focus.EditorText"
383
- },
384
- {
385
- "key": "ArrowUp",
386
- "command": "Editor.cursorUp",
387
- "when": "focus.EditorText"
388
- },
389
- {
390
- "key": "ArrowDown",
391
- "command": "Editor.cursorDown",
392
- "when": "focus.EditorText"
393
- },
394
- {
395
- "key": "Backspace",
396
- "command": "Editor.deleteLeft",
397
- "when": "focus.EditorText"
398
- },
399
- {
400
- "key": "Delete",
401
- "command": "Editor.deleteRight",
402
- "when": "focus.EditorText"
403
- },
404
- {
405
- "key": "Enter",
406
- "command": "Editor.insertLineBreak",
407
- "when": "focus.EditorText"
408
- },
409
- {
410
- "key": "ctrl+shift+d",
411
- "command": "Editor.copyLineDown",
412
- "when": "focus.EditorText"
413
- },
414
- {
415
- "key": "ctrl+shift+d",
416
- "command": "Focus.set",
417
- "args": ["Run and Debug"]
418
- },
419
- {
420
- "key": "ctrl+shift+ArrowDown",
421
- "command": "Editor.moveLineDown",
422
- "when": "focus.EditorText"
423
- },
424
- {
425
- "key": "ctrl+shift+ArrowUp",
426
- "command": "Editor.moveLineUp",
427
- "when": "focus.EditorText"
428
- },
429
- {
430
- "key": "ctrl+Space",
431
- "command": "Editor.openCompletion",
432
- "when": "focus.EditorText"
433
- },
434
- {
435
- "key": "F2",
436
- "command": "EditorRename.open",
437
- "when": "focus.EditorText"
438
- },
439
- {
440
- "key": "Home",
441
- "command": "Editor.cursorHome",
442
- "when": "focus.EditorText"
443
- },
444
- {
445
- "key": "End",
446
- "command": "Editor.cursorEnd",
447
- "when": "focus.EditorText"
448
- },
449
- {
450
- "key": "ctrl+/",
451
- "command": "Editor.toggleComment",
452
- "when": "focus.EditorText"
453
- },
454
- {
455
- "key": "ArrowDown",
456
- "command": "ActivityBar.focusNext",
457
- "when": "focus.activityBar"
458
- },
459
- {
460
- "key": "ArrowUp",
461
- "command": "ActivityBar.focusPrevious",
462
- "when": "focus.activityBar"
463
- },
464
- {
465
- "key": "Home",
466
- "command": "ActivityBar.focusFirst",
467
- "when": "focus.activityBar"
468
- },
469
- {
470
- "key": "PageUp",
471
- "command": "ActivityBar.focusFirst",
472
- "when": "focus.activityBar"
473
- },
474
- {
475
- "key": "PageDown",
476
- "command": "ActivityBar.focusLast",
477
- "when": "focus.activityBar"
478
- },
479
- {
480
- "key": "End",
481
- "command": "ActivityBar.focusLast",
482
- "when": "focus.activityBar"
483
- },
484
- {
485
- "key": "Space",
486
- "command": "ActivityBar.selectCurrent",
487
- "when": "focus.activityBar"
488
- },
489
- {
490
- "key": "Enter",
491
- "command": "ActivityBar.selectCurrent",
492
- "when": "focus.activityBar"
493
- },
494
- {
495
- "key": "Home",
496
- "command": "ActivityBar.focusFirst",
497
- "when": "focus.activityBar"
498
- },
499
- {
500
- "key": "End",
501
- "command": "ActivityBar.focusLast",
502
- "when": "focus.activityBar"
503
- },
504
- {
505
- "key": "ctrl+c",
506
- "command": "Editor.copy",
507
- "when": "focus.EditorText"
508
- },
509
- {
510
- "key": "ctrl+a",
511
- "command": "Editor.selectAll",
512
- "when": "focus.EditorText"
513
- },
514
- {
515
- "key": "alt+ArrowLeft",
516
- "command": "Editor.cursorWordPartLeft",
517
- "when": "focus.EditorText"
518
- },
519
- {
520
- "key": "alt+ArrowRight",
521
- "command": "Editor.cursorWordPartRight",
522
- "when": "focus.EditorText"
523
- },
524
- {
525
- "key": "ctrl+w",
526
- "command": "Main.closeActiveEditor"
527
- },
528
- {
529
- "key": "ctrl+shift+i",
530
- "command": "Developer.toggleDeveloperTools",
531
- "when": "browser.electron"
532
- },
533
- {
534
- "key": "F6",
535
- "command": "Navigation.focusNextPart"
536
- },
537
- {
538
- "key": "shift+F6",
539
- "command": "Navigation.focusPreviousPart"
540
- },
541
- {
542
- "key": "alt+F3",
543
- "command": "Editor.selectAllOccurrences",
544
- "when": "focus.EditorText"
545
- },
546
- {
547
- "key": "ctrl+g",
548
- "command": "QuickPick.openGoToLine"
549
- },
550
- {
551
- "key": "ctrl+shift+Space",
552
- "command": "Editor.selectInsideString",
553
- "when": "focus.editor"
554
- },
555
- {
556
- "key": "ctrl+Tab",
557
- "command": "Main.focusNext"
558
- },
559
- {
560
- "key": "ctrl+shift+Tab",
561
- "command": "Main.focusPrevious"
562
- },
563
- {
564
- "key": "Escape",
565
- "command": "dialog.close",
566
- "when": "focus.dialog"
567
- },
568
- {
569
- "key": "ctrl+v",
570
- "command": "Explorer.handlePaste",
571
- "when": "focus.Explorer"
572
- },
573
- {
574
- "key": "ctrl+c",
575
- "command": "Explorer.handleCopy",
576
- "when": "focus.Explorer"
577
- },
578
- {
579
- "key": "ArrowDown",
580
- "command": "Menu.focusNext",
581
- "when": "focus.menu"
582
- },
583
- {
584
- "key": "ArrowUp",
585
- "command": "Menu.focusPrevious",
586
- "when": "focus.menu"
587
- },
588
- {
589
- "key": "Enter",
590
- "command": "Menu.selectCurrent",
591
- "when": "focus.menu"
592
- },
593
- {
594
- "key": "Space",
595
- "command": "Menu.selectCurrent",
596
- "when": "focus.menu"
597
- },
598
- {
599
- "key": "Home",
600
- "command": "Menu.focusFirst",
601
- "when": "focus.menu"
602
- },
603
- {
604
- "key": "End",
605
- "command": "Menu.focusLast",
606
- "when": "focus.menu"
607
- },
608
- {
609
- "key": "Escape",
610
- "command": "Menu.hide",
611
- "when": "focus.menu"
612
- },
613
- {
614
- "key": "ctrl+shift+n",
615
- "command": "Workbench.newWindow",
616
- "when": "browser.electron"
617
- },
618
- {
619
- "key": "Tab",
620
- "command": "Menu.noop",
621
- "when": "focus.menu"
622
- },
623
- {
624
- "key": "Shift+Tab",
625
- "command": "Menu.noop",
626
- "when": "focus.menu"
627
- },
628
- {
629
- "key": "ctrl+shift+r",
630
- "command": "Viewlet.openWidget",
631
- "args": ["QuickPick", "recent"]
632
- },
633
- {
634
- "key": "ArrowDown",
635
- "command": "Locations.focusNext",
636
- "when": "focus.locationList"
637
- },
638
- {
639
- "key": "ArrowUp",
640
- "command": "Locations.focusPrevious",
641
- "when": "focus.locationList"
642
- },
643
- {
644
- "key": "Home",
645
- "command": "Locations.focusFirst",
646
- "when": "focus.locationList"
647
- },
648
- {
649
- "key": "End",
650
- "command": "Locations.focusLast",
651
- "when": "focus.locationList"
652
- },
653
- {
654
- "key": "Enter",
655
- "command": "Locations.selectCurrent",
656
- "when": "focus.locationList"
657
- },
658
- {
659
- "key": "ctrl+0",
660
- "command": "SideBar.focus"
661
- },
662
- {
663
- "key": "ctrl+1",
664
- "command": "Main.focus"
665
- },
666
- {
667
- "key": "shift+ArrowUp",
668
- "command": "Editor.selectUp"
669
- },
670
- {
671
- "key": "shift+ArrowDown",
672
- "command": "Editor.selectDown"
673
- },
674
- {
675
- "key": "ctrl+f",
676
- "command": "Editor.openFind"
677
- },
678
- {
679
- "key": "Enter",
680
- "command": "FindWidget.focusNext",
681
- "when": "focus.FindWidget"
682
- },
683
- {
684
- "key": "shift+F4",
685
- "command": "FindWidget.focusPrevious",
686
- "when": "focus.FindWidget"
687
- },
688
- {
689
- "key": "F4",
690
- "command": "FindWidget.focusNext",
691
- "when": "focus.FindWidget"
692
- },
693
- {
694
- "key": "ctrl+=",
695
- "command": "Window.zoomIn"
696
- },
697
- {
698
- "key": "ctrl+-",
699
- "command": "Window.zoomOut"
700
- },
701
- {
702
- "key": "ArrowDown",
703
- "command": "TitleBarMenuBar.handleKeyArrowDown",
704
- "when": "focus.TitleBarMenuBar"
705
- },
706
- {
707
- "key": "ArrowUp",
708
- "command": "TitleBarMenuBar.handleKeyArrowUp",
709
- "when": "focus.TitleBarMenuBar"
710
- },
711
- {
712
- "key": "ArrowRight",
713
- "command": "TitleBarMenuBar.handleKeyArrowRight",
714
- "when": "focus.TitleBarMenuBar"
715
- },
716
- {
717
- "key": "ArrowLeft",
718
- "command": "TitleBarMenuBar.handleKeyArrowLeft",
719
- "when": "focus.TitleBarMenuBar"
720
- },
721
- {
722
- "key": "Space",
723
- "command": "TitleBarMenuBar.handleKeySpace",
724
- "when": "focus.TitleBarMenuBar"
725
- },
726
- {
727
- "key": "Home",
728
- "command": "TitleBarMenuBar.handleKeyHome",
729
- "when": "focus.TitleBarMenuBar"
730
- },
731
- {
732
- "key": "End",
733
- "command": "TitleBarMenuBar.handleKeyEnd",
734
- "when": "focus.TitleBarMenuBar"
735
- },
736
- {
737
- "key": "Escape",
738
- "command": "TitleBarMenuBar.handleKeyEscape",
739
- "when": "focus.TitleBarMenuBar"
740
- },
741
- {
742
- "key": "Enter",
743
- "command": "SimpleBrowser.go",
744
- "when": "focus.SimpleBrowserInput"
745
- },
746
- {
747
- "key": "ctrl+r",
748
- "command": "Window.reload"
749
- },
750
- {
751
- "key": "ctrl+\\",
752
- "command": "Run And Debug.togglePause"
753
- },
754
- {
755
- "key": "Enter",
756
- "command": "Run And Debug.handleEvaluate",
757
- "when": "focus.DebugInput"
758
- },
759
- {
760
- "key": "ArrowLeft",
761
- "command": "EditorImage.moveLeft",
762
- "when": "focus.EditorImage"
763
- },
764
- {
765
- "key": "ArrowRight",
766
- "command": "EditorImage.moveRight",
767
- "when": "focus.EditorImage"
768
- },
769
- {
770
- "key": "ArrowUp",
771
- "command": "EditorImage.moveUp",
772
- "when": "focus.EditorImage"
773
- },
774
- {
775
- "key": "ArrowDown",
776
- "command": "EditorImage.moveDown",
777
- "when": "focus.EditorImage"
778
- },
779
- {
780
- "key": "ctrl+j",
781
- "command": "Viewlet.openWidget",
782
- "args": ["ColorPicker"]
783
- },
784
- {
785
- "key": "ArrowDown",
786
- "command": "Search.focusNext",
787
- "when": "focus.SearchResults"
788
- },
789
- {
790
- "key": "ArrowUp",
791
- "command": "Search.focusPrevious",
792
- "when": "focus.SearchResults"
793
- },
794
- {
795
- "key": "Delete",
796
- "command": "Search.dismissItem",
797
- "when": "focus.SearchResults"
798
- },
799
- {
800
- "key": "Home",
801
- "command": "Search.focusFirst",
802
- "when": "focus.SearchResults"
803
- },
804
- {
805
- "key": "End",
806
- "command": "Search.focusLast",
807
- "when": "focus.SearchResults"
808
- },
809
- {
810
- "key": "ctrl+c",
811
- "command": "Search.copy",
812
- "when": "focus.SearchResults"
813
- }
814
- ]
1
+ []
@@ -14,6 +14,7 @@
14
14
 
15
15
  "editor.autoClosingBrackets": true,
16
16
  "editor.autoClosingQuotes": true,
17
+ "editor.quickSuggestions": false,
17
18
 
18
19
  "extensions.autoUpdate": true,
19
20
 
@@ -36,7 +37,7 @@
36
37
  "simpleBrowser.suggestions": false,
37
38
 
38
39
  "window.titleBarStyle": "native",
39
- "window.zoomLevel": 0.5,
40
+ "window.zoomLevel": 0,
40
41
  "window.controlsOverlay.enabled": true,
41
42
 
42
43
  "workbench.colorTheme": "slime",
@@ -547,6 +547,9 @@ export const tokenizeLine = (line, lineState) => {
547
547
  index += tokenLength
548
548
  tokens.push(token, tokenLength)
549
549
  }
550
+ if (state === State.AfterPropertyName) {
551
+ state = State.InsideSelector
552
+ }
550
553
  return {
551
554
  state,
552
555
  tokens,
@@ -11,7 +11,11 @@
11
11
  ".env.local",
12
12
  ".env.example",
13
13
  ".env.development.example",
14
- ".env.production.example"
14
+ ".env.production.example",
15
+ ".env.development",
16
+ ".env.production",
17
+ ".env.dev",
18
+ ".env.sample"
15
19
  ],
16
20
  "configuration": "./languageConfiguration.json",
17
21
  "tokenize": "src/tokenizeDotenv.js"
@@ -30,6 +30,8 @@ export const TokenType = {
30
30
  NewLine: 771,
31
31
  Keyword: 951,
32
32
  VariableName: 952,
33
+ LanguageConstant: 953,
34
+ KeywordControl: 954,
33
35
  }
34
36
 
35
37
  export const TokenMap = {
@@ -51,14 +53,14 @@ export const TokenMap = {
51
53
  [TokenType.NewLine]: 'NewLine',
52
54
  [TokenType.Keyword]: 'Keyword',
53
55
  [TokenType.VariableName]: 'VariableName',
56
+ [TokenType.LanguageConstant]: 'LanguageConstant',
57
+ [TokenType.KeywordControl]: 'KeywordControl',
54
58
  }
55
59
 
56
60
  const RE_WHITESPACE = /^\s+/
57
61
  const RE_WHITESPACE_SINGLE_LINE = /^( |\t)+/
58
62
  const RE_WHITESPACE_NEWLINE = /^\n/
59
63
  const RE_CONSTANT = /^(true|false|null)/
60
- const RE_STRING_DOUBLE_QUOTE_CONTENT = /^[^"\n]+/
61
- const RE_STRING_SINGLE_QUOTE_CONTENT = /^[^'\n]+/
62
64
  const RE_DOUBLE_QUOTE = /^"/
63
65
  const RE_CURLY_OPEN = /^\{/
64
66
  const RE_CURLY_CLOSE = /^\}/
@@ -82,7 +84,7 @@ const RE_ROUND_CLOSE = /^\)/
82
84
  const RE_DOT = /^\./
83
85
  const RE_EQUAL_SIGN = /^=/
84
86
  const RE_SINGLE_QUOTE = /^'/
85
- const RE_PUNCTUATION = /^[\(\)=\+\-><\.,\/\*\^\[\]\{\}\|:]/
87
+ const RE_PUNCTUATION = /^[\(\)=\+\-><\.,\/\*\^\[\]\{\}\|:\;\%]/
86
88
  const RE_ANYTHING_UNTIL_END = /^.+/s
87
89
  const RE_START_OF_FUNCTION = /^( )*\(/
88
90
  const RE_COLON_COLON = /^::/
@@ -92,17 +94,39 @@ const RE_SQUARE_OPEN_SQUARE_OPEN = /^\[\[/
92
94
  const RE_SQUARE_CLOSE_SQUARE_CLOSE = /^\]\]/
93
95
  const RE_STRING_MULTILINE_CONTENT = /^.+?(?=\]\]|$)/s
94
96
  const RE_KEYWORD =
95
- /^(?:var|type|switch|struct|select|return|range|package|map|interface|import|if|goto|go|func|default|continue|const|chan|case|break)\b/
97
+ /^(?:var|type|true|switch|struct|select|return|range|package|map|interface|import|if|goto|go|for|func|false|default|continue|const|chan|case|break)\b/
96
98
  const RE_TEXT = /^.+/s
99
+ const RE_QUOTE_SINGLE = /^'/
100
+ const RE_QUOTE_DOUBLE = /^"/
101
+ const RE_QUOTE_BACKTICK = /^`/
102
+ const RE_STRING_SINGLE_QUOTE_CONTENT = /^[^'\\]+/
103
+ const RE_STRING_DOUBLE_QUOTE_CONTENT = /^[^"\\]+/
104
+ const RE_STRING_BACKTICK_QUOTE_CONTENT = /^[^`\\\$]+/
105
+ const RE_STRING_ESCAPE = /^\\./
106
+ const RE_BACKSLASH = /^\\/
97
107
 
98
108
  export const initialLineState = {
99
109
  state: State.TopLevelContent,
100
110
  }
101
111
 
112
+ export const hasArrayReturn = true
113
+
114
+ /**
115
+ *
116
+ * @param {*} lineStateA
117
+ * @param {*} lineStateB
118
+ * @returns
119
+ */
102
120
  export const isLineStateEqual = (lineStateA, lineStateB) => {
103
121
  return lineStateA.state === lineStateB.state
104
122
  }
105
123
 
124
+ /**
125
+ *
126
+ * @param {string} line
127
+ * @param {*} lineState
128
+ * @returns
129
+ */
106
130
  export const tokenizeLine = (line, lineState) => {
107
131
  let next = null
108
132
  let index = 0
@@ -117,17 +141,47 @@ export const tokenizeLine = (line, lineState) => {
117
141
  token = TokenType.Whitespace
118
142
  state = State.TopLevelContent
119
143
  } else if ((next = part.match(RE_KEYWORD))) {
120
- token = TokenType.Keyword
144
+ switch (next[0]) {
145
+ case 'true':
146
+ case 'false':
147
+ token = TokenType.LanguageConstant
148
+ break
149
+ case 'as':
150
+ case 'switch':
151
+ case 'default':
152
+ case 'case':
153
+ case 'else':
154
+ case 'if':
155
+ case 'break':
156
+ case 'throw':
157
+ case 'for':
158
+ case 'try':
159
+ case 'catch':
160
+ case 'finally':
161
+ case 'continue':
162
+ case 'while':
163
+ token = TokenType.KeywordControl
164
+ break
165
+ default:
166
+ token = TokenType.Keyword
167
+ break
168
+ }
121
169
  state = State.TopLevelContent
122
170
  } else if ((next = part.match(RE_VARIABLE_NAME))) {
123
171
  token = TokenType.VariableName
124
172
  state = State.TopLevelContent
173
+ } else if ((next = part.match(RE_NUMERIC))) {
174
+ token = TokenType.Numeric
175
+ state = State.TopLevelContent
125
176
  } else if ((next = part.match(RE_LINE_COMMENT))) {
126
177
  token = TokenType.Comment
127
178
  state = State.InsideLineComment
128
179
  } else if ((next = part.match(RE_PUNCTUATION))) {
129
180
  token = TokenType.Punctuation
130
181
  state = State.TopLevelContent
182
+ } else if ((next = part.match(RE_QUOTE_DOUBLE))) {
183
+ token = TokenType.Punctuation
184
+ state = State.InsideDoubleQuoteString
131
185
  } else if ((next = part.match(RE_TEXT))) {
132
186
  token = TokenType.Text
133
187
  state = State.TopLevelContent
@@ -136,6 +190,23 @@ export const tokenizeLine = (line, lineState) => {
136
190
  throw new Error('no')
137
191
  }
138
192
  break
193
+ case State.InsideDoubleQuoteString:
194
+ if ((next = part.match(RE_QUOTE_DOUBLE))) {
195
+ token = TokenType.Punctuation
196
+ state = State.TopLevelContent
197
+ } else if ((next = part.match(RE_STRING_DOUBLE_QUOTE_CONTENT))) {
198
+ token = TokenType.String
199
+ state = State.InsideDoubleQuoteString
200
+ } else if ((next = part.match(RE_STRING_ESCAPE))) {
201
+ token = TokenType.String
202
+ state = State.InsideDoubleQuoteString
203
+ } else if ((next = part.match(RE_BACKSLASH))) {
204
+ token = TokenType.String
205
+ state = State.InsideDoubleQuoteString
206
+ } else {
207
+ throw new Error('no')
208
+ }
209
+ break
139
210
  case State.InsideLineComment:
140
211
  if ((next = part.match(RE_TEXT))) {
141
212
  token = TokenType.Comment
@@ -148,11 +219,9 @@ export const tokenizeLine = (line, lineState) => {
148
219
  state
149
220
  throw new Error('no')
150
221
  }
151
- index += next[0].length
152
- tokens.push({
153
- type: token,
154
- length: next[0].length,
155
- })
222
+ const tokenLength = next[0].length
223
+ index += tokenLength
224
+ tokens.push(token, tokenLength)
156
225
  }
157
226
  return {
158
227
  state,
@@ -0,0 +1,66 @@
1
+ {
2
+ "comments": {
3
+ "blockComment": ["<!--", "-->"]
4
+ },
5
+ "brackets": [
6
+ ["<!--", "-->"],
7
+ ["<", ">"],
8
+ ["{", "}"],
9
+ ["(", ")"]
10
+ ],
11
+ "autoClosingPairs": [
12
+ { "open": "{", "close": "}" },
13
+ { "open": "[", "close": "]" },
14
+ { "open": "(", "close": ")" },
15
+ { "open": "'", "close": "'" },
16
+ { "open": "\"", "close": "\"" },
17
+ { "open": "<!--", "close": "-->", "notIn": ["comment", "string"] }
18
+ ],
19
+ "surroundingPairs": [
20
+ { "open": "'", "close": "'" },
21
+ { "open": "\"", "close": "\"" },
22
+ { "open": "{", "close": "}" },
23
+ { "open": "[", "close": "]" },
24
+ { "open": "(", "close": ")" },
25
+ { "open": "<", "close": ">" }
26
+ ],
27
+ "colorizedBracketPairs": [
28
+ ["{", "}"],
29
+ ["(", ")"]
30
+ ],
31
+ "folding": {
32
+ "markers": {
33
+ "start": "^\\s*<!--\\s*#region\\b.*-->",
34
+ "end": "^\\s*<!--\\s*#endregion\\b.*-->"
35
+ }
36
+ },
37
+ "wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\$\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\s]+)",
38
+ "onEnterRules": [
39
+ {
40
+ "beforeText": {
41
+ "pattern": "<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!\\/)>)[^<]*$",
42
+ "flags": "i"
43
+ },
44
+ "afterText": {
45
+ "pattern": "^<\\/([_:\\w][_:\\w-.\\d]*)\\s*>",
46
+ "flags": "i"
47
+ },
48
+ "action": {
49
+ "indent": "indentOutdent"
50
+ }
51
+ },
52
+ {
53
+ "beforeText": {
54
+ "pattern": "<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr))(\\w[\\w\\d]*)([^/>]*(?!\\/)>)[^<]*$",
55
+ "flags": "i"
56
+ },
57
+ "action": {
58
+ "indent": "indent"
59
+ }
60
+ }
61
+ ],
62
+ "indentationRules": {
63
+ "increaseIndentPattern": "<(?!\\?|(?:area|base|br|col|frame|hr|html|img|input|keygen|link|menuitem|meta|param|source|track|wbr)\\b|[^>]*\\/>)([-_\\.A-Za-z0-9]+)(?=\\s|>)\\b[^>]*>(?!.*<\\/\\1>)|<!--(?!.*-->)|\\{[^}\"']*$",
64
+ "decreaseIndentPattern": "^\\s*(<\\/(?!html)[-_\\.A-Za-z0-9]+\\b[^>]*>|-->|\\})"
65
+ }
66
+ }
@@ -296,9 +296,15 @@ export const tokenizeLine = (line, lineState) => {
296
296
  } else if ((next = part.match(RE_DOUBLE_QUOTE))) {
297
297
  token = TokenType.Punctuation
298
298
  state = State.InsideDoubleQuoteString
299
+ } else if ((next = part.match(RE_ANGLE_BRACKET_OPEN_TAG))) {
300
+ token = TokenType.PunctuationTag
301
+ state = State.AfterOpeningAngleBracket
299
302
  } else if ((next = part.match(RE_TAG_TEXT))) {
300
303
  token = TokenType.Text
301
304
  state = State.TopLevelContent
305
+ } else if ((next = part.match(RE_WHITESPACE))) {
306
+ token = TokenType.Whitespace
307
+ state = State.InsideOpeningTagAndHasSeenWhitespace
302
308
  } else {
303
309
  part //?
304
310
  throw new Error('no')
@@ -454,6 +460,12 @@ export const tokenizeLine = (line, lineState) => {
454
460
  if (state === State.AfterClosingTagAngleBrackets) {
455
461
  state = State.TopLevelContent
456
462
  }
463
+ if (state === State.InsideOpeningTag) {
464
+ state = State.InsideOpeningTagAndHasSeenWhitespace
465
+ }
466
+ if (state === State.AfterAttributeEqualSign) {
467
+ state = State.InsideOpeningTag
468
+ }
457
469
  return {
458
470
  state,
459
471
  tokens,
@@ -53,6 +53,8 @@ const RE_TRIPLE_DOUBLE_QUOTE = /^"""/
53
53
  const RE_STRING_TRIPLE_CONTENT = /^.+?(?="""|$)/s
54
54
  const RE_ATTRIBUTE = /^@\w+/
55
55
 
56
+ export const hasArrayReturn = true
57
+
56
58
  /**
57
59
  * @param {string} line
58
60
  * @param {any} lineState
@@ -122,11 +124,10 @@ export const tokenizeLine = (line, lineState) => {
122
124
  state
123
125
  throw new Error('no')
124
126
  }
125
- index += next[0].length
126
- tokens.push({
127
- type: token,
128
- length: next[0].length,
129
- })
127
+ const currentTokenText = next[0]
128
+ const currentTokenLength = currentTokenText.length
129
+ index += currentTokenLength
130
+ tokens.push(token, currentTokenLength)
130
131
  }
131
132
  return {
132
133
  state,
@@ -174,6 +174,8 @@ const RE_KEYWORD_TYPE = /^type\b/
174
174
  const RE_KEYWORD_IN = /^in\b/
175
175
  const RE_KEYWORD_OF = /^of\b/
176
176
  const RE_KEYWORD_EXTENDS = /^extends\b/
177
+ const RE_KEYWORD_READONLY = /^readonly\b/
178
+ const RE_SHEBANG = /^\#\!\/.*/
177
179
 
178
180
  export const hasArrayReturn = true
179
181
  /**
@@ -284,6 +286,9 @@ export const tokenizeLine = (line, lineState) => {
284
286
  state = State.TopLevelContent
285
287
  break
286
288
  }
289
+ } else if (index === 0 && (next = part.match(RE_SHEBANG))) {
290
+ token = TokenType.Comment
291
+ state = State.TopLevelContent
287
292
  } else if ((next = part.match(RE_VARIABLE_NAME))) {
288
293
  token = TokenType.VariableName
289
294
  state = State.TopLevelContent
@@ -777,6 +782,9 @@ export const tokenizeLine = (line, lineState) => {
777
782
  } else if ((next = part.match(RE_METHOD_NAME))) {
778
783
  token = TokenType.Function
779
784
  state = State.AfterMethodName
785
+ } else if ((next = part.match(RE_KEYWORD_READONLY))) {
786
+ token = TokenType.KeywordModifier
787
+ state = State.InsideTypeObject
780
788
  } else if ((next = part.match(RE_VARIABLE_NAME))) {
781
789
  token = TokenType.VariableName
782
790
  state = State.InsideTypeObject
@@ -796,6 +804,12 @@ export const tokenizeLine = (line, lineState) => {
796
804
  } else if ((next = part.match(RE_VERTICAL_LINE))) {
797
805
  token = TokenType.Punctuation
798
806
  state = State.BeforeType
807
+ } else if ((next = part.match(RE_SQUARE_OPEN))) {
808
+ token = TokenType.Punctuation
809
+ state = State.InsideTypeObject
810
+ } else if ((next = part.match(RE_SQUARE_CLOSE))) {
811
+ token = TokenType.Punctuation
812
+ state = State.InsideTypeObject
799
813
  } else {
800
814
  part
801
815
  throw new Error('no')
@@ -806,6 +820,12 @@ export const tokenizeLine = (line, lineState) => {
806
820
  token = TokenType.Punctuation
807
821
  state = State.InsideMethodParameters
808
822
  // stack.push()
823
+ } else if ((next = part.match(RE_COLON))) {
824
+ token = TokenType.Punctuation
825
+ state = State.AfterMethodName
826
+ } else if ((next = part.match(RE_WHITESPACE))) {
827
+ token = TokenType.Whitespace
828
+ state = State.AfterMethodName
809
829
  } else {
810
830
  throw new Error('no')
811
831
  }
@@ -842,6 +862,12 @@ export const tokenizeLine = (line, lineState) => {
842
862
  token = TokenType.Punctuation
843
863
  state = State.BeforeType
844
864
  stack.push(State.InsideTypeObject)
865
+ } else if ((next = part.match(RE_WHITESPACE))) {
866
+ token = TokenType.Whitespace
867
+ state = State.AfterMethodParameters
868
+ } else if ((next = part.match(RE_ARROW))) {
869
+ token = TokenType.Punctuation
870
+ state = State.BeforeType
845
871
  } else {
846
872
  throw new Error('no')
847
873
  }
@@ -55,8 +55,8 @@
55
55
 
56
56
  "TitleBarBackground": "#21252B",
57
57
  "TitleBarBorderBottomColor": "",
58
- "TitleBarColor": "",
59
- "TitleBarColorInactive": "",
58
+ "TitleBarForeground": "rgb(157, 165, 180)",
59
+ "TitleBarForegroundActive": "rgb(157, 165, 180)",
60
60
 
61
61
  "TreeItemHoverBackground": "rgba(44, 49, 58, 0.4)"
62
62
  },
@@ -38,6 +38,7 @@
38
38
 
39
39
  "MenuItemHoverForeground": "rgb(92, 97, 102)",
40
40
  "MenuItemHoverBackground": "rgba(86, 114, 143, 0.12)",
41
+ "MenuItemSeparatorBackground": "#d4d4d4",
41
42
 
42
43
  "PanelBackground": "#f8f9fa",
43
44
  "PanelBorderTopColor": "#6b7d8f1f",
@@ -59,11 +60,14 @@
59
60
  "TabActiveBackground": "",
60
61
  "TabInactiveBackground": "",
61
62
 
62
- "TitleBarBackground": "",
63
+ "TitleBarBackground": "rgb(248, 249, 250)",
63
64
  "TitleBarBorderBottomColor": "",
64
- "TitleBarForeground": "#8a9199",
65
+ "TitleBarForeground": "rgb(138, 145, 153)",
65
66
  "TitleBarColorInactive": "",
66
67
  "TitleBarItemHoverForeground": "rgba(0, 0, 0, 0.1)",
68
+ "TitleBarForegroundActive": "rgb(92, 97, 102)",
69
+
70
+ "TitleBarButtonCloseHoverForeground": "#fff",
67
71
 
68
72
  "TreeItemForeground": "#8a9199",
69
73
  "TreeItemActiveBackground": "rgba(86, 114, 143, 0.12)"
@@ -58,10 +58,13 @@
58
58
 
59
59
  "TabsBackground": "rgb(18, 39, 56)",
60
60
 
61
- "TitleBarBackground": "#15232D",
61
+ "TitleBarBackground": "rgb(25, 53, 73)",
62
62
  "TitleBarBorderBottomColor": "",
63
63
  "TitleBarColor": "",
64
- "TitleBarColorInactive": "rgba(204, 204, 204, 0.6)"
64
+ "TitleBarColorInactive": "rgba(204, 204, 204, 0.6)",
65
+ "TitleBarActiveBackground": "#15232D",
66
+ "TitleBarForeground": "rgba(255, 255, 255, 0.2)",
67
+ "TitleBarForegroundActive": "rgb(255, 255, 255)"
65
68
  },
66
69
  "tokenColors": [
67
70
  {
@@ -6,8 +6,8 @@
6
6
  "ActivityBarActiveBackground": "#1f2727",
7
7
  "ActivityBarActiveForeground": "rgb(135, 143, 140)",
8
8
 
9
- "BadgeBackground": "purple",
10
- "BadgeForeground": "#fff",
9
+ "BadgeBackground": "#90599b",
10
+ "BadgeForeground": "#eeeeee",
11
11
 
12
12
  "EditorBackGround": "#1e2324",
13
13
  "EditorScrollBarBackground": "rgba(57, 71, 71, 0.6)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "Utility package for @lvce-editor/server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,16 +17,16 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/code-frame": "^7.18.6",
20
- "@lvce-editor/extension-host": "0.14.0",
21
- "@lvce-editor/extension-host-helper-process": "0.14.0",
22
- "@lvce-editor/pty-host": "0.14.0",
20
+ "@lvce-editor/extension-host": "0.14.2",
21
+ "@lvce-editor/extension-host-helper-process": "0.14.2",
22
+ "@lvce-editor/pty-host": "0.14.2",
23
23
  "debug": "^4.3.4",
24
- "execa": "^7.0.0",
24
+ "execa": "^7.1.1",
25
25
  "exit-hook": "^3.2.0",
26
26
  "got": "^12.6.0",
27
27
  "is-object": "^1.0.2",
28
28
  "lines-and-columns": "^2.0.3",
29
- "open": "^8.4.2",
29
+ "open": "^9.0.0",
30
30
  "p-queue": "^7.3.4",
31
31
  "parse-json": "^6.0.2",
32
32
  "symlink-dir": "^5.1.1",
@@ -34,12 +34,12 @@
34
34
  "tar-fs": "^2.1.1",
35
35
  "tmp-promise": "^3.0.3",
36
36
  "trash": "^8.1.1",
37
- "ws": "^8.12.1",
37
+ "ws": "^8.13.0",
38
38
  "xdg-basedir": "^5.1.0"
39
39
  },
40
40
  "optionalDependencies": {
41
41
  "extract-zip": "^2.0.1",
42
42
  "keytar": "^7.9.0",
43
- "vscode-ripgrep-with-github-api-error-fix": "^2.6.0"
43
+ "vscode-ripgrep-with-github-api-error-fix": "^2.8.0"
44
44
  }
45
45
  }
@@ -226,9 +226,14 @@ const applyOverrides = async ({ root, commitHash, pathPrefix }) => {
226
226
  <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">`
227
227
  )
228
228
  }
229
- await replace(Path.join(root, 'dist', 'manifest.json'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
230
- await replace(Path.join(root, 'dist', commitHash, 'css', 'parts', 'ViewletTitleBarButtons.css'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
231
- await replace(Path.join(root, 'dist', commitHash, 'css', 'App.css'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
229
+ if (pathPrefix) {
230
+ await replace(Path.join(root, 'dist', 'manifest.json'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
231
+ await replace(Path.join(root, 'dist', 'manifest.json'), `"start_url": "/"`, `"start_url": "${pathPrefix}"`)
232
+ await replace(Path.join(root, 'dist', commitHash, 'css', 'App.css'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
233
+ await replace(Path.join(root, 'dist', commitHash, 'css', 'parts', 'EditorTabs.css'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
234
+ await replace(Path.join(root, 'dist', commitHash, 'css', 'parts', 'ViewletTitleBarButtons.css'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
235
+ await replace(Path.join(root, 'dist', commitHash, 'css', 'parts', 'ViewletTitleBarIcon.css'), `/${commitHash}`, `${pathPrefix}/${commitHash}`)
236
+ }
232
237
  }
233
238
 
234
239
  const addExtensionSeo = async ({ root, name, description }) => {