forked from scalameta/metals-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
623 lines (623 loc) · 20.4 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
{
"name": "metals",
"displayName": "Scala (Metals)",
"description": "Scala language server with rich IDE features",
"keywords": [
"scala",
"lsp",
"language server",
"ide",
"scalameta"
],
"version": "1.10.7",
"publisher": "scalameta",
"contributors": [
{
"name": "Alexey Alekhin",
"url": "https://github.com/laughedelic"
},
{
"name": "Gabriele Petronella",
"url": "https://github.com/gabro"
},
{
"name": "Ólafur Páll Geirsson",
"url": "https://github.com/olafurpg"
}
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/scalameta/metals-vscode/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/scalameta/metals-vscode.git"
},
"homepage": "https://scalameta.org/metals/",
"engines": {
"vscode": "^1.43.0"
},
"icon": "images/logo.png",
"categories": [
"Programming Languages"
],
"activationEvents": [
"onCommand:metals.new-scala-project",
"onDebugResolve:scala",
"onLanguage:scala",
"workspaceContains:build.sbt",
"workspaceContains:build.sc",
"workspaceContains:project/build.properties",
"workspaceContains:src/main/scala",
"workspaceContains:*/src/main/scala",
"workspaceContains:*/*/src/main/scala"
],
"contributes": {
"configurationDefaults": {
"[scala]": {
"editor.suggestSelection": "first",
"editor.formatOnPaste": true,
"editor.formatOnType": true
}
},
"viewsContainers": {
"activitybar": [
{
"id": "metals-explorer",
"title": "Metals",
"icon": "images/scalameta.svg"
}
]
},
"viewsWelcome": [
{
"view": "metalsPackages",
"contents": "No Scala project found.\n[New Scala project](command:metals.new-scala-project)",
"when": "workbenchState != empty"
}
],
"views": {
"metals-explorer": [
{
"id": "metalsPackages",
"name": "Packages"
},
{
"id": "metalsBuild",
"name": "Build commands"
},
{
"id": "metalsCompile",
"name": "Ongoing compilations"
},
{
"id": "metalsHelp",
"name": "Help and feedback"
}
]
},
"configuration": {
"title": "Metals",
"properties": {
"metals.serverVersion": {
"type": "string",
"default": "0.10.5",
"markdownDescription": "The version of the Metals server artifact. Requires reloading the window.\n\n**Change only if you know what you're doing**"
},
"metals.serverProperties": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"-Xmx512m"
],
"markdownDescription": "Optional list of properties to pass along to the Metals server. By default, the environment variable `JAVA_OPTS` and `.jvmopts` file are respected. Each property needs to be a separate item.\n\nExample: `-Dhttps.proxyHost=…`, `-Dhttps.proxyPort=…` or `-Dmetals.statistics=all`"
},
"metals.ammoniteJvmProperties": {
"type": "array",
"items": {
"type": "string"
},
"markdownDescription": "Optional list of JVM properties to pass along to the Ammonite server. Each property needs to be a separate item.\n\nExample: `-Xmx1G` or `-Xms100M`"
},
"metals.excludedPackages": {
"type": "array",
"default": [],
"markdownDescription": "List of packages you'd like to be left out of completions, symbol searches, and code actions.\n\nEx. `akka.actor.typed.javadsl` will ensure nothing in the `javadsl` package gets recommended to you.\n\nYou can find the list of default exclusions [here on the Metals website](https://scalameta.org/metals/docs/editors/new-editor.html#excluded-packages).\n\nIf you need to remove one of the defaults, you can simply include it and preface it with `--`."
},
"metals.showInferredType": {
"type": "boolean",
"markdownDescription": "When this option is enabled, for each method that have inferred types that are not explicitely specified they are displayed as additional decorations."
},
"metals.showImplicitArguments": {
"type": "boolean",
"markdownDescription": "When this option is enabled, for each method that has implicit arguments they are displayed as additional decorations."
},
"metals.showImplicitConversionsAndClasses": {
"type": "boolean",
"markdownDescription": "When this option is enabled, each implicit method and class is displayed as additional decorations at the usage site."
},
"metals.javaHome": {
"type": "string",
"markdownDescription": "Optional path to the Java home directory. Requires reloading the window.\n\nDefaults to the most recent Java version between 8 and 11 (inclusive) computed by the `locate-java-home` npm package."
},
"metals.sbtScript": {
"type": "string",
"markdownDescription": "Optional absolute path to an `sbt` executable to use for running `sbt bloopInstall`.\n\nBy default, Metals uses `java -jar sbt-launch.jar` with an embedded launcher while respecting `.jvmopts` and `.sbtopts`.\n\nUpdate this setting if your `sbt` script requires more customizations like using environment variables."
},
"metals.millScript": {
"type": "string",
"markdownDescription": "Optional absolute path to a `mill` executable to use for running `mill mill.contrib.Bloop/install`.\n\nBy default, Metals uses an embedded `millw` script while respecting `.mill-version` file.\n\nUpdate this setting if your `mill` script requires more customizations."
},
"metals.mavenScript": {
"type": "string",
"markdownDescription": "Optional absolute path to a `mvn` executable to use for running `mvn ch.epfl.scala:maven-bloop_2.10:<bloop_version>:bloopInstall`.\n\nBy default, Metals uses an embedded `mvnw` script.\n\nUpdate this setting if your `mvn` script requires more customizations."
},
"metals.gradleScript": {
"type": "string",
"markdownDescription": "Optional absolute path to a `gradle` executable to use for running `gradle bloopInstall`.\n\nBy default, Metals uses an embedded `gradlew` script.\n\nUpdate this setting if your `gradle` script requires more customizations."
},
"metals.scalafmtConfigPath": {
"type": "string",
"markdownDescription": "Optional custom path to the .scalafmt.conf file.\n\nShould be an absolute path and use forward slashes `/` for file separators (even on Windows)."
},
"metals.scalafixConfigPath": {
"type": "string",
"markdownDescription": "Optional custom path to the .scalafix.conf file.\n\nShould be an absolute path and use forward slashes `/` for file separators (even on Windows)."
},
"metals.bloopVersion": {
"type": "string",
"markdownDescription": "This version will be used for the Bloop build tool plugin, for any supported build tool,while importing in Metals as well as for running the embedded server"
},
"metals.bloopSbtAlreadyInstalled": {
"type": "boolean",
"markdownDescription": "If true, Metals will not generate a `project/metals.sbt` file under the assumption that sbt-bloop is already manually installed in the sbt build. Build import will fail with a 'not valid command bloopInstall' error in case Bloop is not manually installed in the build when using this option."
},
"metals.customRepositories": {
"type": "array",
"items": {
"type": "string"
},
"markdownDescription": "Optional list of custom resolvers passed to Coursier when fetching metals dependencies.\n\nFor documentation on accepted values see the [Coursier documentation](https://get-coursier.io/docs/other-repositories).\n\nThe extension will pass these to Coursier using the COURSIER_REPOSITORIES environment variable after joining the custom repositories with a pipe character (|)."
},
"metals.superMethodLensesEnabled": {
"type": "boolean",
"default": false,
"description": "Enable/disable goto super method code lens."
},
"metals.enableStripMarginOnTypeFormatting": {
"type": "boolean",
"default": true,
"markdownDescription": "When enabled, if you press the return key from the first line of a multiline string containing a pipe, it will automatically add `.stripMargin`."
},
"metals.fallbackScalaVersion": {
"type": "string",
"default": "automatic",
"enum": [
"automatic",
"2.13.6",
"2.13.5",
"2.13.4",
"2.13.3",
"2.13.2",
"2.13.1",
"2.13.0",
"2.12.14",
"2.12.13",
"2.12.12",
"2.12.11",
"2.12.10",
"2.12.9",
"2.12.8",
"2.11.12",
"3.0.2-RC1",
"3.0.1",
"3.0.0"
],
"markdownDescription": "The Scala compiler version that is used as the default or fallback in case a file doesn't belong to any build target or the specified Scala version isn't supported by Metals.\n\nThis applies to standalone Scala files, worksheets, and Ammonite scripts.\n\n The `automatic` value means that the Scala version for these files will be inferred from the highest supported Scala version in your projects build definition"
}
}
},
"commands": [
{
"command": "metals.reveal-active-file",
"category": "Metals",
"title": "Reveal Active File in Side Bar",
"icon": {
"light": "icons/focus-light.svg",
"dark": "icons/focus-dark.svg"
}
},
{
"command": "metals.restartServer",
"category": "Metals",
"title": "Restart server"
},
{
"command": "metals.build-restart",
"category": "Metals",
"title": "Restart build server"
},
{
"command": "metals.build-import",
"category": "Metals",
"title": "Import build"
},
{
"command": "metals.build-connect",
"category": "Metals",
"title": "Connect to build server"
},
{
"command": "metals.build-disconnect",
"category": "Metals",
"title": "Disconnect from the build server without restarting"
},
{
"command": "metals.bsp-switch",
"category": "Metals",
"title": "Switch build server"
},
{
"command": "metals.generate-bsp-config",
"category": "Metals",
"title": "Attempt to generate bsp config for build tool."
},
{
"command": "metals.sources-scan",
"category": "Metals",
"title": "Rescan sources"
},
{
"command": "metals.compile-cascade",
"category": "Metals",
"title": "Cascade compile"
},
{
"command": "metals.compile-clean",
"category": "Metals",
"title": "Recompile workspace"
},
{
"command": "metals.compile-cancel",
"category": "Metals",
"title": "Cancel compilation"
},
{
"command": "metals.doctor-run",
"category": "Metals",
"title": "Run doctor"
},
{
"command": "metals.new-scala-project",
"category": "Metals",
"title": "New Scala Project"
},
{
"command": "metals.new-scala-file",
"category": "Metals",
"title": "New Scala File..."
},
{
"command": "metals.new-scala-worksheet",
"category": "Metals",
"title": "Create Worksheet"
},
{
"command": "metals.super-method-hierarchy",
"category": "Metals",
"title": "Reveal super method hierachy"
},
{
"command": "metals.reset-choice",
"category": "Metals",
"title": "Reset Choice"
},
{
"command": "metals.analyze-stacktrace",
"category": "Metals",
"title": "Analyze Stacktrace"
},
{
"command": "metals.goto-super-method",
"category": "Metals",
"title": "Go to super method"
},
{
"command": "metals.ammonite-start",
"category": "Metals",
"title": "Start Ammonite build server"
},
{
"command": "metals.ammonite-stop",
"category": "Metals",
"title": "Stop Ammonite build server"
},
{
"command": "metals.toggle-implicit-conversions-and-classes",
"category": "Metals",
"title": "Toggle showing implicit conversions and classes"
},
{
"command": "metals.toggle-implicit-parameters",
"category": "Metals",
"title": "Toggle showing implicit parameters"
},
{
"command": "metals.toggle-show-inferred-type",
"category": "Metals",
"title": "Toggle showing inferred type"
},
{
"command": "metals.copy-worksheet-output",
"category": "Metals",
"title": "Copy worksheet output"
},
{
"command": "metals.run-current-file",
"category": "Metals",
"title": "Run main class in the current file"
},
{
"command": "metals.test-current-file",
"category": "Metals",
"title": "Run test class in the current file"
},
{
"command": "metals.test-current-target",
"category": "Metals",
"title": "Run all test in the current project"
}
],
"menus": {
"view/title": [
{
"command": "metals.reveal-active-file",
"group": "navigation",
"when": "view == metalsPackages"
}
],
"commandPalette": [
{
"command": "metals.reveal-active-file",
"when": "metals:enabled"
},
{
"command": "metals.toggle-implicit-conversions-and-classes",
"when": "metals:enabled"
},
{
"command": "metals.toggle-implicit-parameters",
"when": "metals:enabled"
},
{
"command": "metals.toggle-show-inferred-type",
"when": "metals:enabled"
},
{
"command": "metals.restartServer",
"when": "metals:enabled"
},
{
"command": "metals.build-import",
"when": "metals:enabled"
},
{
"command": "metals.build-restart",
"when": "metals:enabled"
},
{
"command": "metals.build-connect",
"when": "metals:enabled"
},
{
"command": "metals.sources-scan",
"when": "metals:enabled"
},
{
"command": "metals.compile-cascade",
"when": "metals:enabled"
},
{
"command": "metals.compile-clean",
"when": "metals:enabled"
},
{
"command": "metals.compile-cancel",
"when": "metals:enabled"
},
{
"command": "metals.doctor-run",
"when": "metals:enabled"
},
{
"command": "metals.new-scala-file",
"when": "metals:enabled"
},
{
"command": "metals.new-scala-project",
"when": "metals:enabled"
},
{
"command": "metals.super-method-hierarchy",
"when": "metals:enabled"
},
{
"command": "metals.analyze-stacktrace",
"when": "metals:enabled"
},
{
"command": "metals.goto-super-method",
"when": "metals:enabled"
},
{
"command": "metals.reset-choice",
"when": "metals:enabled"
},
{
"command": "metals.ammonite-start",
"when": "metals:enabled"
},
{
"command": "metals.ammonite-stop",
"when": "metals:enabled"
}
],
"explorer/context": [
{
"command": "metals.new-scala-file",
"when": "metals:enabled",
"group": "navigation@4"
}
]
},
"breakpoints": [
{
"language": "scala"
},
{
"language": "java"
}
],
"debuggers": [
{
"type": "scala",
"label": "Scala Debugger",
"languages": [
"scala"
],
"configurationAttributes": {
"launch": {
"properties": {
"mainClass": {
"type": "string",
"description": "Name of the main class to run"
},
"testClass": {
"type": "string",
"description": "Name of the test class to run"
},
"buildTarget": {
"type": "string",
"description": "Name of the build target of the class to run"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arguments passed to the class to run",
"default": []
},
"jvmOptions": {
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"env": {
"type": "object",
"items": {
"type": "string"
},
"default": {}
},
"envFile": {
"type": "string",
"description": "Name of a .env file with additional environment variables",
"default": null
}
}
},
"attach": {
"properties": {
"buildTarget": {
"type": "string",
"description": "Name of the build target to debug"
},
"hostName": {
"type": "string",
"description": "Host name of the debuggee JVM"
},
"port": {
"type": "number",
"description": "Port to attach to"
}
}
}
},
"configurationSnippets": [
{
"label": "Scala: Run main class",
"description": "A new configuration for running a debug session of a main class",
"body": {
"type": "scala",
"request": "launch",
"name": "Untitled",
"mainClass": "???",
"args": [],
"jvmOptions": [],
"env": {}
}
},
{
"label": "Scala: Run test class",
"description": "A new configuration for running a debug session of a test class",
"body": {
"type": "scala",
"request": "launch",
"name": "Untitled",
"testClass": "???"
}
},
{
"label": "Scala: Attach debugger",
"description": "A new configuration for running a debug session of a remote JVM",
"body": {
"type": "scala",
"request": "attach",
"name": "Untitled",
"buildTarget": "???",
"hostName": "localhost",
"port": 5005
}
}
]
}
]
},
"main": "./out/extension",
"scripts": {
"vscode:prepublish": "yarn compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"test": "jest",
"build": "vsce package --yarn",
"vscode:publish": "vsce publish --yarn",
"ovsx:publish": "ovsx publish",
"format": "prettier --write '**/*.{ts,js,json,yml}'",
"format-check": "prettier --check '**/*.{ts,js,json,yml}'"
},
"devDependencies": {
"@types/jest": "^26.0.24",
"@types/node": "16.3.3",
"@types/shell-quote": "1.7.1",
"@types/vscode": "1.43.0",
"jest": "^27.0.6",
"ovsx": "0.1.0",
"prettier": "2.3.2",
"ts-jest": "^27.0.3",
"typescript": "4.3.5",
"vsce": "1.95.1"
},
"dependencies": {
"metals-languageclient": "0.5.1",
"promisify-child-process": "4.1.1",
"vscode-languageclient": "7.0.0"
},
"extensionDependencies": [
"scala-lang.scala"
]
}