forked from Shopify/vscode-ruby-lsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
454 lines (454 loc) · 13.9 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
{
"name": "ruby-lsp",
"displayName": "Ruby LSP",
"description": "VS Code plugin for connecting with the Ruby LSP",
"version": "0.4.9",
"publisher": "Shopify",
"repository": {
"type": "git",
"url": "https://github.com/Shopify/vscode-ruby-lsp.git"
},
"license": "MIT",
"icon": "icon.png",
"engines": {
"vscode": "^1.68.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Testing"
],
"activationEvents": [
"onLanguage:ruby",
"workspaceContains:Gemfile.lock"
],
"main": "./out/extension.js",
"contributes": {
"menus": {
"editor/context": [
{
"when": "resourceLangId == ruby",
"command": "workbench.action.terminal.runSelectedText",
"group": "9_cutcopypaste"
}
]
},
"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.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.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"
}
],
"configuration": {
"title": "Ruby LSP",
"properties": {
"rubyLsp.enableExperimentalFeatures": {
"description": "Enable experimental and under development features",
"type": "boolean",
"default": false
},
"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 (run tests, open Gem pages, ...)",
"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
},
"references": {
"description": "Enable references, which finds all references to the symbol under the cursor",
"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,
"references": true
}
},
"rubyLsp.rubyVersionManager": {
"description": "The Ruby version manager to use",
"type": "string",
"enum": [
"asdf",
"auto",
"chruby",
"none",
"rbenv",
"rvm",
"shadowenv",
"custom"
],
"default": "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.yjit": {
"description": "Use YJIT to speed up the Ruby LSP server",
"type": "boolean",
"default": true
},
"rubyLsp.formatter": {
"description": "Which tool the Ruby LSP should use for formatting files",
"type": "string",
"enum": [
"auto",
"rubocop",
"syntax_tree",
"none"
],
"default": "auto"
},
"rubyLsp.bundleGemfile": {
"description": "Relative or absolute path to the Gemfile to use for bundling the Ruby LSP server. 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"
}
}
},
"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": {}
},
"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": [
".gemspec",
".irbrc",
".jbuilder",
".pryrc",
".rake",
".rb",
".ru",
".ruby"
],
"filenames": [
"brewfile",
"capfile",
"rakefile",
"gemfile"
]
},
{
"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
}
}
},
"scripts": {
"vscode:prepublish": "yarn run esbuild-base --minify",
"package": "vsce package --out vscode-ruby-lsp.vsix",
"package_prerelease": "vsce package --pre-release --out vscode-ruby-lsp.vsix",
"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' && 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.23.0",
"@shopify/eslint-plugin": "^43.0.0",
"@shopify/prettier-config": "^1.1.2",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.2",
"@types/node": "20.x",
"@types/vscode": "^1.68.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vscode/test-electron": "^2.3.4",
"@vscode/vsce": "^2.21.1",
"esbuild": "^0.19.4",
"eslint": "^8.50.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-prettier": "^5.0.0",
"glob": "^10.3.7",
"mocha": "^10.2.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"dependencies": {
"vscode-languageclient": "^9.0.1"
}
}