forked from mechatroner/vscode_rainbow_csv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
598 lines (598 loc) 路 22.9 KB
/
Copy pathpackage.json
File metadata and controls
598 lines (598 loc) 路 22.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
{
"name": "rainbow-csv",
"displayName": "Rainbow CSV",
"description": "Highlight CSV and TSV files, Run SQL-like queries",
"version": "3.24.1",
"publisher": "mechatroner",
"license": "MIT",
"icon": "rainbow_csv_logo.png",
"engines": {
"vscode": "^1.95.0"
},
"keywords": [
"csv",
"tsv",
"highlight"
],
"categories": [
"Data Science",
"Other",
"Programming Languages"
],
"activationEvents": [
"onLanguage:csv",
"onLanguage:tsv",
"onLanguage:csv (semicolon)",
"onLanguage:csv (pipe)",
"onLanguage:csv (whitespace)",
"onLanguage:dynamic csv",
"onLanguage:plaintext",
"onCommand:rainbow-csv.RBQL",
"onCommand:rainbow-csv.RainbowSeparator",
"onCommand:rainbow-csv.SampleHead",
"onCommand:rainbow-csv.SampleTail"
],
"main": "./extension",
"browser": "./dist/web/extension.js",
"contributes": {
"colors": [
{
"id": "rainbowtrack1",
"description": "Color for column tracking one.",
"defaults": {
"dark": "#ff0000",
"light": "#ff0000",
"highContrast": "#ff0000",
"highContrastLight": "#ff0000"
}
},
{
"id": "rainbowtrack2",
"description": "Color for column tracking two.",
"defaults": {
"dark": "#00ff00",
"light": "#00ff00",
"highContrast": "#00ff00",
"highContrastLight": "#00ff00"
}
},
{
"id": "rainbowtrack3",
"description": "Color for column tracking three.",
"defaults": {
"dark": "#0000ff",
"light": "#0000ff",
"highContrast": "#0000ff",
"highContrastLight": "#0000ff"
}
}
],
"configuration": {
"type": "object",
"title": "Rainbow CSV",
"properties": {
"rainbow_csv.enable_sticky_header": {
"type": "boolean",
"default": true,
"order": 1,
"description": "Enable sticky header line at the top."
},
"rainbow_csv.enable_separator_autodetection": {
"type": "boolean",
"default": true,
"order": 2,
"description": "Enable automatic content based separator autodetection."
},
"rainbow_csv.autodetect_separators": {
"type": "array",
"default": [
"TAB",
",",
";",
"|"
],
"description": "Enable automatic content-based separator autodetection for the specified list of separators (multicharacter separators are supported).",
"order": 3,
"items": {
"type": "string",
"description": "Separator"
}
},
"rainbow_csv.autodetection_min_line_count": {
"type": "number",
"default": 10,
"order": 4,
"description": "Minimum number of non-comment lines in file for content-based autodetection."
},
"rainbow_csv.highlight_rows": {
"type": "boolean",
"default": false,
"order": 5,
"description": "Highlight rows with alternate background colors by default."
},
"rainbow_csv.virtual_alignment_mode": {
"type": "string",
"enum": ["disabled", "manual", "always"],
"enumDescriptions": ["Disabled. Align only when \"VirtualAlign\" command is executed", "Align when \"Align\" Status Bar button is clicked", "Automatically align all files"],
"order": 6,
"default": "disabled",
"description": "Virtual alignment based on VSCode inlay hints that doesn't change underlying file content."
},
"rainbow_csv.virtual_alignment_char": {
"type": "string",
"enum": ["middot", "space"],
"enumDescriptions": ["Middle dot", "Whitespace"],
"order": 7,
"default": "middot",
"description": "Virtual alignment character."
},
"rainbow_csv.virtual_alignment_vertical_grid": {
"type": "boolean",
"default": false,
"order": 8,
"description": "Show vertical grid in virtual alignment mode."
},
"rainbow_csv.enable_tooltip": {
"type": "boolean",
"default": true,
"order": 9,
"description": "Enable column-info tooltip on hover."
},
"rainbow_csv.enable_tooltip_column_names": {
"type": "boolean",
"default": true,
"order": 10,
"description": "Show column names in tooltip."
},
"rainbow_csv.enable_cursor_position_info": {
"type": "boolean",
"default": true,
"order": 11,
"description": "Keyboard input text cursor: show info about the cursor CSV column in the status bar."
},
"rainbow_csv.double_width_alignment": {
"type": "boolean",
"default": true,
"order": 12,
"description": "If enabled treat double width unicode chars e.g. Chinese or Japanese chars as double wide when aligning."
},
"rainbow_csv.enable_auto_csv_lint": {
"type": "boolean",
"default": true,
"order": 13,
"description": "Automatically run linter for every CSV file."
},
"rainbow_csv.csv_lint_detect_trailing_spaces": {
"type": "boolean",
"default": false,
"order": 14,
"description": "CSV Lint: detect leading and trailing whitespaces in fields and show warning."
},
"rainbow_csv.comment_prefix": {
"type": "string",
"default": "",
"order": 15,
"description": "Comment lines prefix, e.g. \"#\". Set to empty string to disable."
},
"rainbow_csv.rbql_output_dir": {
"type": "string",
"default": "TMP",
"order": 16,
"description": "Output directory for RBQL result sets, can be `TMP`, `INPUT` or a custom absolute path. `TMP` - output in system tmp dir(default), `INPUT` - output in the same dir as input file, otherwise use provided path as the output directory e.g. `/path/to/custom/dir`."
},
"rainbow_csv.rbql_with_headers_by_default": {
"type": "boolean",
"default": false,
"order": 17,
"description": "RBQL treats the first line as header by default."
},
"rainbow_csv.rbql_strip_spaces": {
"type": "boolean",
"default": true,
"order": 18,
"description": "RBQL strips (trims) leading and trailing spaces from each field as a preprocessig step."
},
"rainbow_csv.enable_context_menu_head": {
"type": "boolean",
"default": false,
"order": 19,
"description": "Enable \"Preview CSV head\" option in File Explorer context menu for all files."
},
"rainbow_csv.enable_context_menu_tail": {
"type": "boolean",
"default": false,
"order": 20,
"description": "Enable \"Preview CSV tail\" option in File Explorer context menu for all files."
},
"rainbow_csv.enable_debug_logging": {
"type": "boolean",
"default": false,
"order": 21,
"description": "Dev Mode: Enable Debug Logging. Run command [Developer: Show Logs...] -> [rainbow_csv_debug_channel] to see the output."
}
}
},
"submenus": [
{
"id": "rainbow_csv.submenu",
"label": "Rainbow CSV"
}
],
"menus": {
"editor/context": [
{
"submenu": "rainbow_csv.submenu"
}
],
"rainbow_csv.submenu": [
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.GoToColumn",
"group": "common@7"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.SetHeaderLine",
"group": "common@7"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.SetCommentPrefix",
"group": "common@6"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|plaintext|^[ct]sv/",
"command": "rainbow-csv.RainbowSeparator",
"group": "common@5"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.RBQL",
"group": "common@4"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.ToggleRowBackground",
"group": "common@3"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.ToggleColumnTracking",
"group": "common@2"
},
{
"when": "editorTextFocus && editorLangId =~ /plaintext/",
"command": "rainbow-csv.RainbowSeparatorOn",
"group": "common@1"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.ExcelCopy",
"group": "datacopy@1"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.MarkdownCopy",
"group": "datacopy@2"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.Align",
"group": "regular_align@1"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.Shrink",
"group": "regular_align@2"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.VirtualAlign",
"group": "virtual_align@1"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.VirtualShrink",
"group": "virtual_align@2"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.ColumnEditSelect",
"group": "wgroup@1"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.ColumnEditBefore",
"group": "wgroup@2"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.ColumnEditAfter",
"group": "wgroup@3"
},
{
"when": "editorTextFocus && editorLangId =~ /dynamic csv|^[ct]sv/",
"command": "rainbow-csv.RainbowSeparatorOff",
"group": "xgroup@1"
}
],
"explorer/context": [
{
"command": "rainbow-csv.SampleHead",
"when": "config.rainbow_csv.enable_context_menu_head || resourceLangId =~ /plaintext|^[ct]sv/",
"group": "rainbow_csv"
},
{
"command": "rainbow-csv.SampleTail",
"when": "config.rainbow_csv.enable_context_menu_tail",
"group": "rainbow_csv"
}
]
},
"languages": [
{
"id": "csv",
"aliases": [
"CSV",
"csv"
],
"extensions": [
".csv"
],
"configuration": "./language-configuration.json"
},
{
"id": "tsv",
"aliases": [
"TSV",
"tsv"
],
"extensions": [
".tsv",
".tab"
],
"configuration": "./language-configuration.json"
},
{
"id": "csv (pipe)",
"aliases": [
"CSV (pipe)",
"csv (pipe)"
],
"extensions": [],
"configuration": "./language-configuration.json"
},
{
"id": "csv (whitespace)",
"aliases": [
"CSV (whitespace)",
"csv (whitespace)"
],
"extensions": [],
"configuration": "./language-configuration.json"
},
{
"id": "csv (semicolon)",
"aliases": [
"CSV (semicolon)",
"csv (semicolon)"
],
"extensions": [],
"configuration": "./language-configuration.json"
},
{
"id": "dynamic csv",
"aliases": [
"Dynamic CSV",
"dynamic csv"
],
"extensions": [],
"configuration": "./language-configuration.json"
}
],
"commands": [
{
"command": "rainbow-csv.CSVLint",
"category": "Rainbow CSV",
"title": "CSV Lint"
},
{
"command": "rainbow-csv.SetVirtualHeader",
"category": "Rainbow CSV",
"title": "Set virtual header"
},
{
"command": "rainbow-csv.SetHeaderLine",
"category": "Rainbow CSV",
"title": "Set header line"
},
{
"command": "rainbow-csv.SetCommentPrefix",
"category": "Rainbow CSV",
"title": "Set selection as comment prefix"
},
{
"command": "rainbow-csv.RBQL",
"category": "Rainbow CSV",
"title": "RBQL Query"
},
{
"command": "rainbow-csv.SetJoinTableName",
"category": "Rainbow CSV",
"title": "Set join table name for RBQL"
},
{
"command": "rainbow-csv.ColumnEditBefore",
"category": "Rainbow CSV",
"title": "Column edit - Before"
},
{
"command": "rainbow-csv.ColumnEditAfter",
"category": "Rainbow CSV",
"title": "Column edit - After"
},
{
"command": "rainbow-csv.ColumnEditSelect",
"category": "Rainbow CSV",
"title": "Column edit - Selection"
},
{
"command": "rainbow-csv.RainbowSeparator",
"category": "Rainbow CSV",
"title": "Set rainbow separator"
},
{
"command": "rainbow-csv.ToggleColumnTracking",
"category": "Rainbow CSV",
"title": "Toggle Column Tracking"
},
{
"command": "rainbow-csv.ExcelCopy",
"category": "Rainbow CSV",
"title": "Copy for Excel / Sheets export"
},
{
"command": "rainbow-csv.MarkdownCopy",
"category": "Rainbow CSV",
"title": "Copy in Markdown table format"
},
{
"command": "rainbow-csv.RainbowSeparatorOff",
"category": "Rainbow CSV",
"title": "Disable Rainbow CSV"
},
{
"command": "rainbow-csv.RainbowSeparatorOn",
"category": "Rainbow CSV",
"title": "Re-enable Rainbow CSV"
},
{
"command": "rainbow-csv.ToggleRowBackground",
"category": "Rainbow CSV",
"title": "Toggle Alternating Row Background"
},
{
"command": "rainbow-csv.Align",
"category": "Rainbow CSV",
"title": "Align CSV Columns with whitespaces"
},
{
"command": "rainbow-csv.Shrink",
"category": "Rainbow CSV",
"title": "Shrink CSV table - trim whitespaces"
},
{
"command": "rainbow-csv.VirtualAlign",
"category": "Rainbow CSV",
"title": "Virtual Align CSV Columns"
},
{
"command": "rainbow-csv.VirtualShrink",
"category": "Rainbow CSV",
"title": "Undo Virtual Align"
},
{
"command": "rainbow-csv.CopyBack",
"category": "Rainbow CSV",
"title": "CopyBack"
},
{
"command": "rainbow-csv.SampleHead",
"title": "Preview big CSV: head"
},
{
"command": "rainbow-csv.SampleTail",
"title": "Preview big CSV: tail"
},
{
"command": "rainbow-csv.GoToColumn",
"category": "Rainbow CSV",
"title": "Go to column"
}
],
"semanticTokenScopes": [
{
"language": "dynamic csv",
"scopes": {
"rainbow1": ["rainbow1"],
"rainbow2": ["keyword.rainbow2"],
"rainbow3": ["entity.name.function.rainbow3"],
"rainbow4": ["comment.rainbow4"],
"rainbow5": ["string.rainbow5"],
"rainbow6": ["variable.parameter.rainbow6"],
"rainbow7": ["constant.numeric.rainbow7"],
"rainbow8": ["entity.name.type.rainbow8"],
"rainbow9": ["markup.bold.rainbow9"],
"rainbow10": ["invalid.rainbow10"],
"comment": ["comment"]
}
}
],
"configurationDefaults": {
"[dynamic csv][csv][tsv][csv (semicolon)][csv (pipe)][csv (whitespace)]": {
"editor.semanticHighlighting.enabled": true
}
},
"grammars": [
{
"language": "csv",
"scopeName": "text.csv",
"path": "./syntaxes/csv.tmLanguage.json"
},
{
"language": "tsv",
"scopeName": "text.tsv",
"path": "./syntaxes/tsv.tmLanguage.json"
},
{
"language": "csv (pipe)",
"scopeName": "text.psv",
"path": "./syntaxes/pipe_simple.tmLanguage.json"
},
{
"language": "csv (whitespace)",
"scopeName": "text.wspcsv",
"path": "./syntaxes/wspcsv.tmLanguage.json"
},
{
"language": "csv (semicolon)",
"scopeName": "text.scsv",
"path": "./syntaxes/scsv.tmLanguage.json"
},
{
"language": "dynamic csv",
"scopeName": "text.dynamiccsv",
"path": "./syntaxes/dynamic_csv.tmLanguage.json"
}
]
},
"capabilities": {
"hoverProvider": "true"
},
"scripts": {
"vscode:prepublish": "npm run package-web",
"compile-web": "webpack",
"lint": "eslint rainbow_utils.js fast_load_utils.js extension.js test/runTest.js && eslint -c .eslintrc_browser.json rainbow_utils.js rbql_client.js dialect_select.js",
"watch-web": "webpack --watch",
"package-web": "webpack --mode production --devtool hidden-source-map",
"start-web-server": "vscode-test-web --version stable --browser=none --extensionDevelopmentPath=. test",
"test-in-browser": "vscode-test-web --version stable --browser=chromium --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/suite/index.js test",
"test": "node ./test/runTest.js",
"unit-test-only": "node ./test/suite/run_unit_tests.js"
},
"devDependencies": {
"@types/vscode": "^1.95.0",
"@vscode/test-web": "^0.0.64",
"@vscode/test-electron": "^2.4.1",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4",
"assert": "^2.1.0",
"process": "^0.11.10",
"globals": "^15.12.0",
"eslint": "^9.15.0"
},
"repository": {
"type": "git",
"url": "https://github.com/mechatroner/vscode_rainbow_csv"
}
}