-
Notifications
You must be signed in to change notification settings - Fork 179
/
Copy pathpackage.json
779 lines (779 loc) · 24.8 KB
/
package.json
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
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
{
"name": "ruby-lsp",
"displayName": "Ruby LSP",
"description": "VS Code plugin for connecting with the Ruby LSP",
"version": "0.9.4",
"publisher": "Shopify",
"repository": {
"type": "git",
"url": "https://github.com/Shopify/ruby-lsp.git"
},
"license": "MIT",
"icon": "icon.png",
"engines": {
"vscode": "^1.91.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Testing",
"AI",
"Chat"
],
"activationEvents": [
"onLanguage:ruby",
"workspaceContains:Gemfile.lock",
"workspaceContains:gems.locked",
"onView:dependencies"
],
"extensionDependencies": [
"vscode.git"
],
"main": "./out/extension.js",
"contributes": {
"chatParticipants": [
{
"id": "rubyLsp.chatAgent",
"fullName": "Ruby",
"name": "ruby",
"description": "How can I help with your Ruby on Rails application?",
"isSticky": true,
"commands": [
{
"name": "design",
"description": "Explain what you're trying to build and I will suggest possible ways to model the domain"
}
]
}
],
"menus": {
"editor/context": [
{
"when": "resourceLangId == ruby",
"command": "workbench.action.terminal.runSelectedText",
"group": "9_cutcopypaste"
}
],
"view/title": [
{
"command": "rubyLsp.fileOperation",
"when": "rubyLsp.activated && view == 'workbench.explorer.fileView'",
"group": "navigation"
}
],
"explorer/context": [
{
"command": "rubyLsp.fileOperation",
"when": "rubyLsp.activated",
"group": "2_workspace"
}
]
},
"commands": [
{
"command": "rubyLsp.start",
"title": "Start",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.restart",
"title": "Restart",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.stop",
"title": "Stop",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.showServerChangelog",
"title": "Open server changelog in browser",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.startServerInDebugMode",
"title": "Debug the Ruby LSP server",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.update",
"title": "Update language server gem",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.selectRubyVersionManager",
"title": "Select Ruby version manager",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.toggleFeatures",
"title": "Toggle features",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.displayAddons",
"title": "Display addons",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.runTest",
"title": "Run current test",
"category": "Ruby LSP",
"when": "editorActive && editorLangId == ruby"
},
{
"command": "rubyLsp.runTestInTerminal",
"title": "Run current test in terminal",
"category": "Ruby LSP",
"when": "editorActive && editorLangId == ruby"
},
{
"command": "rubyLsp.debugTest",
"title": "Debug current test",
"category": "Ruby LSP",
"when": "editorActive && editorLangId == ruby"
},
{
"command": "rubyLsp.showSyntaxTree",
"title": "Show syntax tree",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.railsGenerate",
"title": "Rails generate",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.railsDestroy",
"title": "Rails destroy",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.fileOperation",
"title": "Ruby file operations",
"category": "Ruby LSP",
"icon": "$(ruby)"
},
{
"command": "rubyLsp.collectRubyLspInfo",
"title": "Collect Ruby LSP information for issue reporting",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.migrateLaunchConfiguration",
"title": "Migrate launch.json configurations from rdbg to ruby_lsp",
"category": "Ruby LSP"
},
{
"command": "rubyLsp.showOutput",
"title": "Show output channel",
"category": "Ruby LSP"
}
],
"configuration": {
"title": "Ruby LSP",
"properties": {
"rubyLsp.enabledFeatures": {
"description": "List of enabled LSP features",
"type": "object",
"properties": {
"codeActions": {
"description": "Enable code actions, like RuboCop quick fixes",
"type": "boolean",
"default": true
},
"diagnostics": {
"description": "Enable diagnostics, like RuboCop violations",
"type": "boolean",
"default": true
},
"documentHighlights": {
"description": "Enable document highlight, which highlights the occurrences of the entity at cursor position",
"type": "boolean",
"default": true
},
"documentLink": {
"description": "Enable document link, which generates clickable link to 'PATH' based on '# source://PATH' comments",
"type": "boolean",
"default": true
},
"documentSymbols": {
"description": "Enable document symbols, which populates the file outline and breadcrumbs",
"type": "boolean",
"default": true
},
"foldingRanges": {
"description": "Enable folding ranges, which populates the places where code can be folded",
"type": "boolean",
"default": true
},
"formatting": {
"description": "Enable formatting",
"type": "boolean",
"default": true
},
"hover": {
"description": "Enable hover, which displays a widget with extra information when hovering over certain code",
"type": "boolean",
"default": true
},
"inlayHint": {
"description": "Enable inlay hints",
"type": "boolean",
"default": true
},
"onTypeFormatting": {
"description": "Enable on type formatting",
"type": "boolean",
"default": true
},
"selectionRanges": {
"description": "Enable selection ranges, which selects code based on the position of the cursor(s)",
"type": "boolean",
"default": true
},
"semanticHighlighting": {
"description": "Enable semantic highlighting, which highlights code based on Ruby's understanding of it",
"type": "boolean",
"default": true
},
"completion": {
"description": "Enable completion, which provides suggestions for code completion",
"type": "boolean",
"default": true
},
"codeLens": {
"description": "Enable code lens, which generates clickable text to enrich editor experience",
"type": "boolean",
"default": true
},
"definition": {
"description": "Enable go to definition, which navigates to the definition of the symbol under the cursor",
"type": "boolean",
"default": true
},
"workspaceSymbol": {
"description": "Enable workspace symbol, which allows fuzzy searching for symbols in the entire project with CTRL/CMD + T",
"type": "boolean",
"default": true
},
"signatureHelp": {
"description": "Enable signature help, which shows the parameters and documentation for the method being invoked",
"type": "boolean",
"default": true
},
"typeHierarchy": {
"description": "Enable type hierarchy lookup, which shows the supertypes and subtypes of the selected symbol",
"type": "boolean",
"default": true
}
},
"default": {
"codeActions": true,
"diagnostics": true,
"documentHighlights": true,
"documentLink": true,
"documentSymbols": true,
"foldingRanges": true,
"formatting": true,
"hover": true,
"inlayHint": true,
"onTypeFormatting": true,
"selectionRanges": true,
"semanticHighlighting": true,
"completion": true,
"codeLens": true,
"definition": true,
"workspaceSymbol": true,
"signatureHelp": true,
"typeHierarchy": true
}
},
"rubyLsp.featuresConfiguration": {
"description": "Turn on/off specific features from request",
"type": "object",
"properties": {
"inlayHint": {
"description": "Customize inlay hint features",
"type": "object",
"properties": {
"enableAll": {
"type": "boolean"
},
"implicitRescue": {
"description": "Enable inlay hints for bare rescues",
"type": "boolean"
},
"implicitHashValue": {
"description": "Enable inlay hints for omitted hash values",
"type": "boolean"
}
}
}
}
},
"rubyLsp.addonSettings": {
"description": "Settings that will be forwarded to configure the behavior of Ruby LSP addons. Keys are addon names, values are objects of settings",
"type": "object",
"examples": [
{
"Ruby LSP Rails": {
"something": true
}
},
{
"Standard Ruby": {
"something": true
}
}
]
},
"rubyLsp.rubyVersionManager": {
"type": "object",
"properties": {
"identifier": {
"description": "The Ruby version manager to use",
"type": "string",
"enum": [
"asdf",
"auto",
"chruby",
"none",
"rbenv",
"rvm",
"shadowenv",
"mise",
"custom"
],
"default": "auto"
},
"asdfExecutablePath": {
"description": "The path to the asdf executable script, if not installed on one of the standard locations",
"type": "string"
},
"miseExecutablePath": {
"description": "The path to the Mise executable, if not installed in ~/.local/bin/mise",
"type": "string"
},
"rbenvExecutablePath": {
"description": "The path to the rbenv executable, if not installed on one of the standard locations",
"type": "string"
},
"chrubyRubies": {
"description": "An array of extra directories to search for Ruby installations when using chruby. Equivalent to the RUBIES environment variable",
"type": "array"
}
},
"default": {
"identifier": "auto"
}
},
"rubyLsp.customRubyCommand": {
"description": "A shell command to activate the right Ruby version or add a custom Ruby bin folder to the PATH. Only used if rubyVersionManager is set to 'custom'",
"type": "string"
},
"rubyLsp.formatter": {
"description": "Which tool the Ruby LSP should use for formatting files",
"type": "string",
"enum": [
"auto",
"rubocop",
"rubocop_internal",
"syntax_tree",
"standard",
"rubyfmt",
"none"
],
"enumDescriptions": [
"Automatically detect formatter",
"RuboCop",
"Ruby LSP RuboCop integration",
"Syntax Tree",
"Standard (supported by community addon)",
"Rubyfmt (supported by community addon)",
"Do not use a formatter"
],
"default": "auto"
},
"rubyLsp.linters": {
"description": "List of linter tools that the Ruby LSP should use for diagnostics",
"type": "array",
"examples": [
[
"rubocop_internal"
]
],
"default": null
},
"rubyLsp.bundleGemfile": {
"description": "Relative or absolute path to the Gemfile to use for bundling the Ruby LSP server. Do not use this if you're working on a monorepo or your project's Gemfile is in a subdirectory (look into multiroot workspaces instead). Only necessary when using a separate Gemfile for the Ruby LSP",
"type": "string",
"default": ""
},
"rubyLsp.testTimeout": {
"description": "The amount of time in seconds to wait for a test to finish before timing out. Only used when running tests from the test explorer",
"type": "integer",
"default": 30
},
"rubyLsp.branch": {
"description": "Run the Ruby LSP server from the specified branch rather than using the released gem. Only supported if not using bundleGemfile",
"type": "string",
"default": ""
},
"rubyLsp.pullDiagnosticsOn": {
"description": "When to pull diagnostics from the server (on change, save or both). Selecting 'save' may significantly improve performance on large files",
"type": "string",
"enum": [
"change",
"save",
"both"
],
"default": "both"
},
"rubyLsp.useBundlerCompose": {
"description": "This is a temporary setting for testing purposes, do not use it! Replace the composed bundle logic by bundler-compose.",
"type": "boolean",
"default": false
},
"rubyLsp.bypassTypechecker": {
"description": "Ignores if the project uses a typechecker. Only intended to be used while working on the Ruby LSP itself",
"type": "boolean",
"default": false
},
"rubyLsp.rubyExecutablePath": {
"description": "Path to the Ruby installation. This is used as a fallback if version manager activation fails",
"type": "string"
},
"rubyLsp.indexing": {
"description": "Indexing configurations. Modifying these will impact which declarations are available for definition, completion and other features",
"type": "object",
"properties": {
"excludedPatterns": {
"type": "array",
"description": "List of glob patterns to exclude from indexing. For excluding gems, use excludedGems instead.",
"items": {
"type": "string"
}
},
"includedPatterns": {
"type": "array",
"description": "List of glob patterns to include when indexing. For example, Ruby files that do not have the .rb extension.",
"items": {
"type": "string"
}
},
"includedGems": {
"type": "array",
"description": "List of gems to include when indexing. You should only use this setting to include development gems in indexing (which are auto excluded).",
"items": {
"type": "string"
}
},
"excludedGems": {
"type": "array",
"description": "List of gems to exclude from indexing. For example, gems that are not intended to have their declarations referenced from the application.",
"items": {
"type": "string"
}
},
"excludedMagicComments": {
"type": "array",
"description": "List of magic comments that should not be considered as documentation for declarations.",
"items": {
"type": "string"
}
}
}
},
"rubyLsp.erbSupport": {
"description": "Enable ERB support. This can only work with server versions v0.17.5 or above",
"type": "boolean",
"default": true
},
"rubyLsp.featureFlags": {
"description": "Allows opting in or out of feature flags",
"type": "object",
"properties": {
"all": {
"description": "Opt-into all available feature flags",
"type": "boolean"
},
"tapiocaAddon": {
"description": "Opt-in/out of the Tapioca add-on",
"type": "boolean"
},
"fullTestDiscovery": {
"description": "UNDER DEVEOPMENT. Opt-in/out of the full test discovery experience",
"type": "boolean"
},
"launcher": {
"description": "Opt-in/out of the new launcher mode",
"type": "boolean"
}
},
"default": {}
}
}
},
"views": {
"explorer": [
{
"id": "dependencies",
"name": "Dependencies",
"icon": "$(package)",
"description": "View and manage dependencies",
"contextualTitle": "Dependencies",
"when": "rubyLsp.activated"
}
]
},
"breakpoints": [
{
"language": "ruby"
}
],
"debuggers": [
{
"type": "ruby_lsp",
"label": "Ruby LSP debug client",
"languages": [
"ruby"
],
"configurationAttributes": {
"launch": {
"required": [
"program"
],
"properties": {
"program": {
"type": "string",
"description": "The program to debug"
},
"env": {
"type": "object",
"description": "Environment variables defined as a key value pair. Example: { \"BACKTRACE\": \"1\" }",
"additionalProperties": {
"type": "string"
}
}
}
},
"attach": {
"properties": {
"debugSocketPath": {
"type": "string",
"description": "The path to the debug socket. This is used to connect to the debugger"
},
"debugPort": {
"type": "number",
"description": "The port to use to connect to the debugger"
},
"debugHost": {
"type": "string",
"description": "The host to use to connect to the debugger"
}
}
}
},
"configurationSnippets": [
{
"label": "Ruby: Debug program",
"description": "New configuration for debugging a Ruby program",
"body": {
"type": "ruby_lsp",
"request": "launch",
"name": "Debug program",
"program": "ruby ${file}"
}
},
{
"label": "Ruby: Debug a Minitest / Test Unit file",
"description": "New configuration for debugging a Minitest / Test Unit file",
"body": {
"type": "ruby_lsp",
"request": "launch",
"name": "Debug test file",
"program": "ruby -Itest ${relativeFile}"
}
},
{
"label": "Ruby: Attach the debugger to a running process",
"description": "New configuration for attaching the debugger to a process that was started with the debugger",
"body": {
"type": "ruby_lsp",
"request": "attach",
"name": "Attach to a debuggee"
}
}
]
}
],
"snippets": [
{
"language": "ruby",
"path": "./snippets.json"
}
],
"grammars": [
{
"language": "ruby",
"scopeName": "source.ruby",
"path": "./grammars/ruby.cson.json"
},
{
"language": "erb",
"scopeName": "text.html.erb",
"path": "./grammars/erb.cson.json",
"embeddedLanguages": {
"source.css": "css",
"source.js": "javascript",
"source.ruby": "ruby"
}
}
],
"languages": [
{
"id": "ruby",
"aliases": [
"Ruby",
"ruby"
],
"firstLine": "^#!\\s*/.*(?:ruby|rbx|rake)\\b",
"extensions": [
".rb",
".builder",
".eye",
".fcgi",
".gemspec",
".god",
".irbrc",
".jbuilder",
".mspec",
".pluginspec",
".podspec",
".prawn",
".pryrc",
".rabl",
".rake",
".rbi",
".rbuild",
".rbw",
".rbx",
".ru",
".ruby",
".spec",
".thor",
".watchr"
],
"filenames": [
".irbrc",
".pryrc",
".simplecov",
"Appraisals",
"Berksfile",
"Brewfile",
"Buildfile",
"Capfile",
"Dangerfile",
"Deliverfile",
"Fastfile",
"Gemfile",
"Guardfile",
"Jarfile",
"Mavenfile",
"Podfile",
"Puppetfile",
"Rakefile",
"Snapfile",
"Steepfile",
"Thorfile",
"Vagrantfile"
],
"configuration": "./languages/ruby.json"
},
{
"id": "erb",
"extensions": [
".erb",
".rhtml",
".rhtm"
],
"configuration": "./languages/erb.json"
}
],
"configurationDefaults": {
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/.ruby-lsp": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"**/.ruby-lsp": true
},
"[ruby]": {
"editor.defaultFormatter": "Shopify.ruby-lsp",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.semanticHighlighting.enabled": true,
"editor.formatOnType": true,
"editor.wordSeparators": "`~@#$%^&*()-=+[{]}\\|;:'\",.<>/"
}
}
},
"scripts": {
"vscode:prepublish": "yarn run esbuild-base --minify",
"package": "vsce package --out vscode-ruby-lsp.vsix --baseImagesUrl https://github.com/Shopify/ruby-lsp/raw/HEAD/vscode",
"package_prerelease": "vsce package --pre-release --out vscode-ruby-lsp.vsix --baseImagesUrl https://github.com/Shopify/ruby-lsp/raw/HEAD/vscode",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "yarn run compile",
"format": "eslint '**/*.ts' --fix && prettier '**/*.{json,md,yaml,yml}' --write",
"lint": "eslint '**/*.ts' --max-warnings=0 && prettier '**/*.{json,md,yaml,yml}' --check",
"test": "node ./out/test/runTest.js"
},
"resolutions": {
"node-fetch": ">= 2.6.7",
"cross-fetch": ">= 3.1.5",
"ws": ">= 7.4.6"
},
"devDependencies": {
"@babel/core": "^7.26.8",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.20.0",
"@shopify/eslint-plugin": "^46.0.0",
"@shopify/prettier-config": "^1.1.2",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.10",
"@types/node": "22.x",
"@types/sinon": "^17.0.3",
"@types/vscode": "^1.91.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vscode/test-electron": "^2.4.1",
"@vscode/vsce": "^3.2.2",
"esbuild": "^0.25.0",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-prettier": "^5.2.3",
"glob": "^11.0.1",
"mocha": "^11.1.0",
"ovsx": "^0.10.1",
"prettier": "^3.5.0",
"typescript": "^5.7.3",
"sinon": "^19.0.2",
"vscode-oniguruma": "^2.0.1",
"vscode-textmate": "^9.2.0"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
}
}