aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/package-lock.json731
-rw-r--r--editors/code/package.json141
-rw-r--r--editors/code/rollup.config.js3
-rw-r--r--editors/code/src/commands/analyzer_status.ts14
-rw-r--r--editors/code/src/commands/apply_source_change.ts8
-rw-r--r--editors/code/src/commands/cargo_watch.ts49
-rw-r--r--editors/code/src/commands/expand_macro.ts10
-rw-r--r--editors/code/src/commands/index.ts2
-rw-r--r--editors/code/src/commands/inlay_hints.ts34
-rw-r--r--editors/code/src/commands/join_lines.ts6
-rw-r--r--editors/code/src/commands/matching_brace.ts6
-rw-r--r--editors/code/src/commands/on_enter.ts8
-rw-r--r--editors/code/src/commands/parent_module.ts6
-rw-r--r--editors/code/src/commands/runnables.ts52
-rw-r--r--editors/code/src/commands/syntaxTree.ts10
-rw-r--r--editors/code/src/commands/watch_status.ts2
-rw-r--r--editors/code/src/config.ts113
-rw-r--r--editors/code/src/events/change_active_text_editor.ts6
-rw-r--r--editors/code/src/events/change_text_document.ts2
-rw-r--r--editors/code/src/extension.ts73
-rw-r--r--editors/code/src/highlighting.ts30
-rw-r--r--editors/code/src/notifications/publish_decorations.ts11
-rw-r--r--editors/code/src/server.ts39
-rw-r--r--editors/code/src/test/fixtures/rust-diagnostics/error/E0277.json261
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts29
-rw-r--r--editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts26
-rw-r--r--editors/code/src/test/utils/diagnotics/rust.test.ts92
-rw-r--r--editors/code/src/test/utils/diagnotics/vscode.test.ts24
-rw-r--r--editors/code/src/test/utils/index.ts2
-rw-r--r--editors/code/src/utils/diagnostics/SuggestedFix.ts4
-rw-r--r--editors/code/src/utils/diagnostics/SuggestedFixCollection.ts6
-rw-r--r--editors/code/src/utils/diagnostics/rust.ts58
-rw-r--r--editors/code/src/utils/diagnostics/vscode.ts2
-rw-r--r--editors/code/src/utils/processes.ts4
-rw-r--r--editors/code/tsconfig.json9
-rw-r--r--editors/code/tslint.json12
36 files changed, 1186 insertions, 699 deletions
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index a41497a23..4c5c13646 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -60,9 +60,9 @@
60 "dev": true 60 "dev": true
61 }, 61 },
62 "@types/node": { 62 "@types/node": {
63 "version": "10.14.13", 63 "version": "12.12.21",
64 "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.13.tgz", 64 "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.21.tgz",
65 "integrity": "sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ==", 65 "integrity": "sha512-8sRGhbpU+ck1n0PGAUgVrWrWdjSW2aqNeyC15W88GRsMpSwzv6RJGlLhE7s2RhVSOdyDmxbqlWSeThq4/7xqlA==",
66 "dev": true 66 "dev": true
67 }, 67 },
68 "@types/resolve": { 68 "@types/resolve": {
@@ -81,9 +81,9 @@
81 "dev": true 81 "dev": true
82 }, 82 },
83 "@types/vscode": { 83 "@types/vscode": {
84 "version": "1.37.0", 84 "version": "1.41.0",
85 "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.37.0.tgz", 85 "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.41.0.tgz",
86 "integrity": "sha512-PRfeuqYuzk3vjf+puzxltIUWC+AhEGYpFX29/37w30DQSQnpf5AgMVf7GDBAdmTbWTBou+EMFz/Ne6XCM/KxzQ==", 86 "integrity": "sha512-7SfeY5u9jgiELwxyLB3z7l6l/GbN9CqpCQGkcRlB7tKRFBxzbz2PoBfGrLxI1vRfUCIq5+hg5vtDHExwq5j3+A==",
87 "dev": true 87 "dev": true
88 }, 88 },
89 "acorn": { 89 "acorn": {
@@ -131,6 +131,12 @@
131 "sprintf-js": "~1.0.2" 131 "sprintf-js": "~1.0.2"
132 } 132 }
133 }, 133 },
134 "atob": {
135 "version": "2.1.2",
136 "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
137 "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
138 "dev": true
139 },
134 "azure-devops-node-api": { 140 "azure-devops-node-api": {
135 "version": "7.2.0", 141 "version": "7.2.0",
136 "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", 142 "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz",
@@ -198,6 +204,17 @@
198 "ansi-styles": "^3.2.1", 204 "ansi-styles": "^3.2.1",
199 "escape-string-regexp": "^1.0.5", 205 "escape-string-regexp": "^1.0.5",
200 "supports-color": "^5.3.0" 206 "supports-color": "^5.3.0"
207 },
208 "dependencies": {
209 "supports-color": {
210 "version": "5.5.0",
211 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
212 "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
213 "dev": true,
214 "requires": {
215 "has-flag": "^3.0.0"
216 }
217 }
201 } 218 }
202 }, 219 },
203 "cheerio": { 220 "cheerio": {
@@ -215,22 +232,44 @@
215 } 232 }
216 }, 233 },
217 "cliui": { 234 "cliui": {
218 "version": "4.1.0", 235 "version": "5.0.0",
219 "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", 236 "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
220 "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", 237 "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
221 "dev": true, 238 "dev": true,
222 "requires": { 239 "requires": {
223 "string-width": "^2.1.1", 240 "string-width": "^3.1.0",
224 "strip-ansi": "^4.0.0", 241 "strip-ansi": "^5.2.0",
225 "wrap-ansi": "^2.0.0" 242 "wrap-ansi": "^5.1.0"
243 },
244 "dependencies": {
245 "ansi-regex": {
246 "version": "4.1.0",
247 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
248 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
249 "dev": true
250 },
251 "string-width": {
252 "version": "3.1.0",
253 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
254 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
255 "dev": true,
256 "requires": {
257 "emoji-regex": "^7.0.1",
258 "is-fullwidth-code-point": "^2.0.0",
259 "strip-ansi": "^5.1.0"
260 }
261 },
262 "strip-ansi": {
263 "version": "5.2.0",
264 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
265 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
266 "dev": true,
267 "requires": {
268 "ansi-regex": "^4.1.0"
269 }
270 }
226 } 271 }
227 }, 272 },
228 "code-point-at": {
229 "version": "1.1.0",
230 "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
231 "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
232 "dev": true
233 },
234 "color-convert": { 273 "color-convert": {
235 "version": "1.9.3", 274 "version": "1.9.3",
236 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 275 "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -247,9 +286,9 @@
247 "dev": true 286 "dev": true
248 }, 287 },
249 "commander": { 288 "commander": {
250 "version": "2.20.0", 289 "version": "2.20.3",
251 "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", 290 "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
252 "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", 291 "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
253 "dev": true 292 "dev": true
254 }, 293 },
255 "concat-map": { 294 "concat-map": {
@@ -258,19 +297,6 @@
258 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 297 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
259 "dev": true 298 "dev": true
260 }, 299 },
261 "cross-spawn": {
262 "version": "6.0.5",
263 "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
264 "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
265 "dev": true,
266 "requires": {
267 "nice-try": "^1.0.4",
268 "path-key": "^2.0.1",
269 "semver": "^5.5.0",
270 "shebang-command": "^1.2.0",
271 "which": "^1.2.9"
272 }
273 },
274 "css-select": { 300 "css-select": {
275 "version": "1.2.0", 301 "version": "1.2.0",
276 "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", 302 "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
@@ -290,12 +316,12 @@
290 "dev": true 316 "dev": true
291 }, 317 },
292 "debug": { 318 "debug": {
293 "version": "3.1.0", 319 "version": "3.2.6",
294 "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 320 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
295 "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 321 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
296 "dev": true, 322 "dev": true,
297 "requires": { 323 "requires": {
298 "ms": "2.0.0" 324 "ms": "^2.1.1"
299 } 325 }
300 }, 326 },
301 "decamelize": { 327 "decamelize": {
@@ -304,6 +330,12 @@
304 "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 330 "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
305 "dev": true 331 "dev": true
306 }, 332 },
333 "decode-uri-component": {
334 "version": "0.2.0",
335 "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
336 "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
337 "dev": true
338 },
307 "define-properties": { 339 "define-properties": {
308 "version": "1.1.3", 340 "version": "1.1.3",
309 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 341 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
@@ -372,15 +404,6 @@
372 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 404 "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
373 "dev": true 405 "dev": true
374 }, 406 },
375 "end-of-stream": {
376 "version": "1.4.1",
377 "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
378 "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
379 "dev": true,
380 "requires": {
381 "once": "^1.4.0"
382 }
383 },
384 "entities": { 407 "entities": {
385 "version": "1.1.2", 408 "version": "1.1.2",
386 "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", 409 "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
@@ -388,23 +411,27 @@
388 "dev": true 411 "dev": true
389 }, 412 },
390 "es-abstract": { 413 "es-abstract": {
391 "version": "1.13.0", 414 "version": "1.16.3",
392 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", 415 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz",
393 "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", 416 "integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==",
394 "dev": true, 417 "dev": true,
395 "requires": { 418 "requires": {
396 "es-to-primitive": "^1.2.0", 419 "es-to-primitive": "^1.2.1",
397 "function-bind": "^1.1.1", 420 "function-bind": "^1.1.1",
398 "has": "^1.0.3", 421 "has": "^1.0.3",
422 "has-symbols": "^1.0.1",
399 "is-callable": "^1.1.4", 423 "is-callable": "^1.1.4",
400 "is-regex": "^1.0.4", 424 "is-regex": "^1.0.4",
401 "object-keys": "^1.0.12" 425 "object-inspect": "^1.7.0",
426 "object-keys": "^1.1.1",
427 "string.prototype.trimleft": "^2.1.0",
428 "string.prototype.trimright": "^2.1.0"
402 } 429 }
403 }, 430 },
404 "es-to-primitive": { 431 "es-to-primitive": {
405 "version": "1.2.0", 432 "version": "1.2.1",
406 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", 433 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
407 "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", 434 "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
408 "dev": true, 435 "dev": true,
409 "requires": { 436 "requires": {
410 "is-callable": "^1.1.4", 437 "is-callable": "^1.1.4",
@@ -439,6 +466,16 @@
439 "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 466 "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
440 "dev": true 467 "dev": true
441 }, 468 },
469 "eslint-plugin-prettier": {
470 "version": "2.7.0",
471 "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz",
472 "integrity": "sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA==",
473 "dev": true,
474 "requires": {
475 "fast-diff": "^1.1.1",
476 "jest-docblock": "^21.0.0"
477 }
478 },
442 "esprima": { 479 "esprima": {
443 "version": "4.0.1", 480 "version": "4.0.1",
444 "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 481 "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
@@ -452,25 +489,16 @@
452 "dev": true 489 "dev": true
453 }, 490 },
454 "esutils": { 491 "esutils": {
455 "version": "2.0.2", 492 "version": "2.0.3",
456 "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", 493 "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
457 "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", 494 "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
458 "dev": true 495 "dev": true
459 }, 496 },
460 "execa": { 497 "fast-diff": {
461 "version": "1.0.0", 498 "version": "1.2.0",
462 "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", 499 "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz",
463 "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", 500 "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
464 "dev": true, 501 "dev": true
465 "requires": {
466 "cross-spawn": "^6.0.0",
467 "get-stream": "^4.0.0",
468 "is-stream": "^1.1.0",
469 "npm-run-path": "^2.0.0",
470 "p-finally": "^1.0.0",
471 "signal-exit": "^3.0.0",
472 "strip-eof": "^1.0.0"
473 }
474 }, 502 },
475 "fd-slicer": { 503 "fd-slicer": {
476 "version": "1.1.0", 504 "version": "1.1.0",
@@ -517,19 +545,10 @@
517 "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 545 "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
518 "dev": true 546 "dev": true
519 }, 547 },
520 "get-stream": {
521 "version": "4.1.0",
522 "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
523 "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
524 "dev": true,
525 "requires": {
526 "pump": "^3.0.0"
527 }
528 },
529 "glob": { 548 "glob": {
530 "version": "7.1.4", 549 "version": "7.1.6",
531 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", 550 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
532 "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", 551 "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
533 "dev": true, 552 "dev": true,
534 "requires": { 553 "requires": {
535 "fs.realpath": "^1.0.0", 554 "fs.realpath": "^1.0.0",
@@ -562,9 +581,9 @@
562 "dev": true 581 "dev": true
563 }, 582 },
564 "has-symbols": { 583 "has-symbols": {
565 "version": "1.0.0", 584 "version": "1.0.1",
566 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", 585 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
567 "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", 586 "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
568 "dev": true 587 "dev": true
569 }, 588 },
570 "he": { 589 "he": {
@@ -595,12 +614,29 @@
595 "requires": { 614 "requires": {
596 "agent-base": "4", 615 "agent-base": "4",
597 "debug": "3.1.0" 616 "debug": "3.1.0"
617 },
618 "dependencies": {
619 "debug": {
620 "version": "3.1.0",
621 "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
622 "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
623 "dev": true,
624 "requires": {
625 "ms": "2.0.0"
626 }
627 },
628 "ms": {
629 "version": "2.0.0",
630 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
631 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
632 "dev": true
633 }
598 } 634 }
599 }, 635 },
600 "https-proxy-agent": { 636 "https-proxy-agent": {
601 "version": "2.2.3", 637 "version": "2.2.4",
602 "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.3.tgz", 638 "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
603 "integrity": "sha512-Ytgnz23gm2DVftnzqRRz2dOXZbGd2uiajSw/95bPp6v53zPRspQjLm/AfBgqbJ2qfeRXWIOMVLpp86+/5yX39Q==", 639 "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
604 "dev": true, 640 "dev": true,
605 "requires": { 641 "requires": {
606 "agent-base": "^4.3.0", 642 "agent-base": "^4.3.0",
@@ -618,9 +654,9 @@
618 } 654 }
619 }, 655 },
620 "inherits": { 656 "inherits": {
621 "version": "2.0.3", 657 "version": "2.0.4",
622 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 658 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
623 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 659 "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
624 "dev": true 660 "dev": true
625 }, 661 },
626 "interpret": { 662 "interpret": {
@@ -629,16 +665,10 @@
629 "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", 665 "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
630 "dev": true 666 "dev": true
631 }, 667 },
632 "invert-kv": {
633 "version": "2.0.0",
634 "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
635 "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
636 "dev": true
637 },
638 "is-buffer": { 668 "is-buffer": {
639 "version": "2.0.3", 669 "version": "2.0.4",
640 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", 670 "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
641 "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", 671 "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
642 "dev": true 672 "dev": true
643 }, 673 },
644 "is-callable": { 674 "is-callable": {
@@ -683,19 +713,13 @@
683 "has": "^1.0.1" 713 "has": "^1.0.1"
684 } 714 }
685 }, 715 },
686 "is-stream": {
687 "version": "1.1.0",
688 "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
689 "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
690 "dev": true
691 },
692 "is-symbol": { 716 "is-symbol": {
693 "version": "1.0.2", 717 "version": "1.0.3",
694 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", 718 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
695 "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", 719 "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
696 "dev": true, 720 "dev": true,
697 "requires": { 721 "requires": {
698 "has-symbols": "^1.0.0" 722 "has-symbols": "^1.0.1"
699 } 723 }
700 }, 724 },
701 "isexe": { 725 "isexe": {
@@ -704,6 +728,12 @@
704 "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 728 "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
705 "dev": true 729 "dev": true
706 }, 730 },
731 "jest-docblock": {
732 "version": "21.2.0",
733 "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz",
734 "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==",
735 "dev": true
736 },
707 "js-tokens": { 737 "js-tokens": {
708 "version": "4.0.0", 738 "version": "4.0.0",
709 "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 739 "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -720,19 +750,11 @@
720 "esprima": "^4.0.0" 750 "esprima": "^4.0.0"
721 } 751 }
722 }, 752 },
723 "jsonc-parser": { 753 "lines-and-columns": {
724 "version": "2.2.0", 754 "version": "1.1.6",
725 "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.0.tgz", 755 "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
726 "integrity": "sha512-4fLQxW1j/5fWj6p78vAlAafoCKtuBm6ghv+Ij5W2DrDx0qE+ZdEl2c6Ko1mgJNF5ftX1iEWQQ4Ap7+3GlhjkOA==" 756 "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
727 }, 757 "dev": true
728 "lcid": {
729 "version": "2.0.0",
730 "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
731 "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
732 "dev": true,
733 "requires": {
734 "invert-kv": "^2.0.0"
735 }
736 }, 758 },
737 "linkify-it": { 759 "linkify-it": {
738 "version": "2.2.0", 760 "version": "2.2.0",
@@ -768,6 +790,11 @@
768 "chalk": "^2.0.1" 790 "chalk": "^2.0.1"
769 } 791 }
770 }, 792 },
793 "lookpath": {
794 "version": "1.0.4",
795 "resolved": "https://registry.npmjs.org/lookpath/-/lookpath-1.0.4.tgz",
796 "integrity": "sha512-xVFrWlfo7n8VZs1YjBWKkbSIJU7DKE/0Mep62KeT94V1Ui1IY9w5fXfgiCsDIDZkakIYSXSeaW2FLbCqfw9/Cw=="
797 },
771 "magic-string": { 798 "magic-string": {
772 "version": "0.25.3", 799 "version": "0.25.3",
773 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", 800 "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz",
@@ -777,15 +804,6 @@
777 "sourcemap-codec": "^1.4.4" 804 "sourcemap-codec": "^1.4.4"
778 } 805 }
779 }, 806 },
780 "map-age-cleaner": {
781 "version": "0.1.3",
782 "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
783 "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
784 "dev": true,
785 "requires": {
786 "p-defer": "^1.0.0"
787 }
788 },
789 "markdown-it": { 807 "markdown-it": {
790 "version": "8.4.2", 808 "version": "8.4.2",
791 "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", 809 "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz",
@@ -805,29 +823,12 @@
805 "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", 823 "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
806 "dev": true 824 "dev": true
807 }, 825 },
808 "mem": {
809 "version": "4.3.0",
810 "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
811 "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
812 "dev": true,
813 "requires": {
814 "map-age-cleaner": "^0.1.1",
815 "mimic-fn": "^2.0.0",
816 "p-is-promise": "^2.0.0"
817 }
818 },
819 "mime": { 826 "mime": {
820 "version": "1.6.0", 827 "version": "1.6.0",
821 "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 828 "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
822 "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 829 "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
823 "dev": true 830 "dev": true
824 }, 831 },
825 "mimic-fn": {
826 "version": "2.1.0",
827 "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
828 "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
829 "dev": true
830 },
831 "minimatch": { 832 "minimatch": {
832 "version": "3.0.4", 833 "version": "3.0.4",
833 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 834 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -853,9 +854,9 @@
853 } 854 }
854 }, 855 },
855 "mocha": { 856 "mocha": {
856 "version": "6.2.0", 857 "version": "6.2.2",
857 "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", 858 "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz",
858 "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", 859 "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==",
859 "dev": true, 860 "dev": true,
860 "requires": { 861 "requires": {
861 "ansi-colors": "3.2.3", 862 "ansi-colors": "3.2.3",
@@ -878,20 +879,11 @@
878 "supports-color": "6.0.0", 879 "supports-color": "6.0.0",
879 "which": "1.3.1", 880 "which": "1.3.1",
880 "wide-align": "1.1.3", 881 "wide-align": "1.1.3",
881 "yargs": "13.2.2", 882 "yargs": "13.3.0",
882 "yargs-parser": "13.0.0", 883 "yargs-parser": "13.1.1",
883 "yargs-unparser": "1.5.0" 884 "yargs-unparser": "1.6.0"
884 }, 885 },
885 "dependencies": { 886 "dependencies": {
886 "debug": {
887 "version": "3.2.6",
888 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
889 "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
890 "dev": true,
891 "requires": {
892 "ms": "^2.1.1"
893 }
894 },
895 "glob": { 887 "glob": {
896 "version": "7.1.3", 888 "version": "7.1.3",
897 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 889 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
@@ -905,28 +897,13 @@
905 "once": "^1.3.0", 897 "once": "^1.3.0",
906 "path-is-absolute": "^1.0.0" 898 "path-is-absolute": "^1.0.0"
907 } 899 }
908 },
909 "ms": {
910 "version": "2.1.1",
911 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
912 "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
913 "dev": true
914 },
915 "supports-color": {
916 "version": "6.0.0",
917 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
918 "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
919 "dev": true,
920 "requires": {
921 "has-flag": "^3.0.0"
922 }
923 } 900 }
924 } 901 }
925 }, 902 },
926 "ms": { 903 "ms": {
927 "version": "2.0.0", 904 "version": "2.1.1",
928 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 905 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
929 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 906 "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
930 "dev": true 907 "dev": true
931 }, 908 },
932 "mute-stream": { 909 "mute-stream": {
@@ -935,12 +912,6 @@
935 "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 912 "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
936 "dev": true 913 "dev": true
937 }, 914 },
938 "nice-try": {
939 "version": "1.0.5",
940 "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
941 "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
942 "dev": true
943 },
944 "node-environment-flags": { 915 "node-environment-flags": {
945 "version": "1.0.5", 916 "version": "1.0.5",
946 "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", 917 "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
@@ -951,15 +922,6 @@
951 "semver": "^5.7.0" 922 "semver": "^5.7.0"
952 } 923 }
953 }, 924 },
954 "npm-run-path": {
955 "version": "2.0.2",
956 "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
957 "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
958 "dev": true,
959 "requires": {
960 "path-key": "^2.0.0"
961 }
962 },
963 "nth-check": { 925 "nth-check": {
964 "version": "1.0.2", 926 "version": "1.0.2",
965 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", 927 "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
@@ -969,10 +931,10 @@
969 "boolbase": "~1.0.0" 931 "boolbase": "~1.0.0"
970 } 932 }
971 }, 933 },
972 "number-is-nan": { 934 "object-inspect": {
973 "version": "1.0.1", 935 "version": "1.7.0",
974 "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 936 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
975 "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", 937 "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
976 "dev": true 938 "dev": true
977 }, 939 },
978 "object-keys": { 940 "object-keys": {
@@ -1024,17 +986,6 @@
1024 "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", 986 "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
1025 "dev": true 987 "dev": true
1026 }, 988 },
1027 "os-locale": {
1028 "version": "3.1.0",
1029 "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
1030 "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
1031 "dev": true,
1032 "requires": {
1033 "execa": "^1.0.0",
1034 "lcid": "^2.0.0",
1035 "mem": "^4.0.0"
1036 }
1037 },
1038 "os-tmpdir": { 989 "os-tmpdir": {
1039 "version": "1.0.2", 990 "version": "1.0.2",
1040 "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 991 "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
@@ -1051,24 +1002,6 @@
1051 "os-tmpdir": "^1.0.0" 1002 "os-tmpdir": "^1.0.0"
1052 } 1003 }
1053 }, 1004 },
1054 "p-defer": {
1055 "version": "1.0.0",
1056 "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
1057 "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
1058 "dev": true
1059 },
1060 "p-finally": {
1061 "version": "1.0.0",
1062 "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
1063 "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
1064 "dev": true
1065 },
1066 "p-is-promise": {
1067 "version": "2.1.0",
1068 "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
1069 "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==",
1070 "dev": true
1071 },
1072 "p-limit": { 1005 "p-limit": {
1073 "version": "2.2.1", 1006 "version": "2.2.1",
1074 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", 1007 "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
@@ -1123,12 +1056,6 @@
1123 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1056 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
1124 "dev": true 1057 "dev": true
1125 }, 1058 },
1126 "path-key": {
1127 "version": "2.0.1",
1128 "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
1129 "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
1130 "dev": true
1131 },
1132 "path-parse": { 1059 "path-parse": {
1133 "version": "1.0.6", 1060 "version": "1.0.6",
1134 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", 1061 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
@@ -1142,21 +1069,11 @@
1142 "dev": true 1069 "dev": true
1143 }, 1070 },
1144 "prettier": { 1071 "prettier": {
1145 "version": "1.18.2", 1072 "version": "1.19.1",
1146 "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", 1073 "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
1147 "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", 1074 "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
1148 "dev": true 1075 "dev": true
1149 }, 1076 },
1150 "pump": {
1151 "version": "3.0.0",
1152 "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
1153 "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
1154 "dev": true,
1155 "requires": {
1156 "end-of-stream": "^1.1.0",
1157 "once": "^1.3.1"
1158 }
1159 },
1160 "read": { 1077 "read": {
1161 "version": "1.0.7", 1078 "version": "1.0.7",
1162 "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", 1079 "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz",
@@ -1207,6 +1124,12 @@
1207 "path-parse": "^1.0.6" 1124 "path-parse": "^1.0.6"
1208 } 1125 }
1209 }, 1126 },
1127 "resolve-url": {
1128 "version": "0.2.1",
1129 "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
1130 "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
1131 "dev": true
1132 },
1210 "rimraf": { 1133 "rimraf": {
1211 "version": "2.7.1", 1134 "version": "2.7.1",
1212 "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", 1135 "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -1217,9 +1140,9 @@
1217 } 1140 }
1218 }, 1141 },
1219 "rollup": { 1142 "rollup": {
1220 "version": "1.23.1", 1143 "version": "1.27.13",
1221 "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.23.1.tgz", 1144 "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.27.13.tgz",
1222 "integrity": "sha512-95C1GZQpr/NIA0kMUQmSjuMDQ45oZfPgDBcN0yZwBG7Kee//m7H68vgIyg+SPuyrTZ5PrXfyLK80OzXeKG5dAA==", 1145 "integrity": "sha512-hDi7M07MpmNSDE8YVwGVFA8L7n8jTLJ4lG65nMAijAyqBe//rtu4JdxjUBE7JqXfdpqxqDTbCDys9WcqdpsQvw==",
1223 "dev": true, 1146 "dev": true,
1224 "requires": { 1147 "requires": {
1225 "@types/estree": "*", 1148 "@types/estree": "*",
@@ -1281,6 +1204,16 @@
1281 } 1204 }
1282 } 1205 }
1283 }, 1206 },
1207 "rollup-plugin-sourcemaps": {
1208 "version": "0.4.2",
1209 "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.4.2.tgz",
1210 "integrity": "sha1-YhJaqUCHqt97g+9N+vYptHMTXoc=",
1211 "dev": true,
1212 "requires": {
1213 "rollup-pluginutils": "^2.0.1",
1214 "source-map-resolve": "^0.5.0"
1215 }
1216 },
1284 "rollup-plugin-typescript": { 1217 "rollup-plugin-typescript": {
1285 "version": "1.0.1", 1218 "version": "1.0.1",
1286 "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz", 1219 "resolved": "https://registry.npmjs.org/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz",
@@ -1318,14 +1251,15 @@
1318 "dev": true 1251 "dev": true
1319 }, 1252 },
1320 "seedrandom": { 1253 "seedrandom": {
1321 "version": "3.0.1", 1254 "version": "3.0.5",
1322 "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.1.tgz", 1255 "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz",
1323 "integrity": "sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg==" 1256 "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
1324 }, 1257 },
1325 "semver": { 1258 "semver": {
1326 "version": "5.7.0", 1259 "version": "5.7.1",
1327 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", 1260 "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1328 "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" 1261 "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1262 "dev": true
1329 }, 1263 },
1330 "set-blocking": { 1264 "set-blocking": {
1331 "version": "2.0.0", 1265 "version": "2.0.0",
@@ -1333,21 +1267,6 @@
1333 "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 1267 "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
1334 "dev": true 1268 "dev": true
1335 }, 1269 },
1336 "shebang-command": {
1337 "version": "1.2.0",
1338 "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
1339 "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
1340 "dev": true,
1341 "requires": {
1342 "shebang-regex": "^1.0.0"
1343 }
1344 },
1345 "shebang-regex": {
1346 "version": "1.0.0",
1347 "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
1348 "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
1349 "dev": true
1350 },
1351 "shelljs": { 1270 "shelljs": {
1352 "version": "0.8.3", 1271 "version": "0.8.3",
1353 "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", 1272 "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
@@ -1378,10 +1297,23 @@
1378 } 1297 }
1379 } 1298 }
1380 }, 1299 },
1381 "signal-exit": { 1300 "source-map-resolve": {
1382 "version": "3.0.2", 1301 "version": "0.5.2",
1383 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 1302 "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
1384 "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", 1303 "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
1304 "dev": true,
1305 "requires": {
1306 "atob": "^2.1.1",
1307 "decode-uri-component": "^0.2.0",
1308 "resolve-url": "^0.2.1",
1309 "source-map-url": "^0.4.0",
1310 "urix": "^0.1.0"
1311 }
1312 },
1313 "source-map-url": {
1314 "version": "0.4.0",
1315 "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
1316 "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
1385 "dev": true 1317 "dev": true
1386 }, 1318 },
1387 "sourcemap-codec": { 1319 "sourcemap-codec": {
@@ -1406,6 +1338,26 @@
1406 "strip-ansi": "^4.0.0" 1338 "strip-ansi": "^4.0.0"
1407 } 1339 }
1408 }, 1340 },
1341 "string.prototype.trimleft": {
1342 "version": "2.1.0",
1343 "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
1344 "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
1345 "dev": true,
1346 "requires": {
1347 "define-properties": "^1.1.3",
1348 "function-bind": "^1.1.1"
1349 }
1350 },
1351 "string.prototype.trimright": {
1352 "version": "2.1.0",
1353 "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
1354 "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
1355 "dev": true,
1356 "requires": {
1357 "define-properties": "^1.1.3",
1358 "function-bind": "^1.1.1"
1359 }
1360 },
1409 "string_decoder": { 1361 "string_decoder": {
1410 "version": "1.3.0", 1362 "version": "1.3.0",
1411 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1363 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -1424,12 +1376,6 @@
1424 "ansi-regex": "^3.0.0" 1376 "ansi-regex": "^3.0.0"
1425 } 1377 }
1426 }, 1378 },
1427 "strip-eof": {
1428 "version": "1.0.0",
1429 "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
1430 "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
1431 "dev": true
1432 },
1433 "strip-json-comments": { 1379 "strip-json-comments": {
1434 "version": "2.0.1", 1380 "version": "2.0.1",
1435 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1381 "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
@@ -1437,9 +1383,9 @@
1437 "dev": true 1383 "dev": true
1438 }, 1384 },
1439 "supports-color": { 1385 "supports-color": {
1440 "version": "5.5.0", 1386 "version": "6.0.0",
1441 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1387 "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
1442 "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1388 "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
1443 "dev": true, 1389 "dev": true,
1444 "requires": { 1390 "requires": {
1445 "has-flag": "^3.0.0" 1391 "has-flag": "^3.0.0"
@@ -1461,16 +1407,16 @@
1461 "dev": true 1407 "dev": true
1462 }, 1408 },
1463 "tslint": { 1409 "tslint": {
1464 "version": "5.18.0", 1410 "version": "5.20.1",
1465 "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz", 1411 "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz",
1466 "integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==", 1412 "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==",
1467 "dev": true, 1413 "dev": true,
1468 "requires": { 1414 "requires": {
1469 "@babel/code-frame": "^7.0.0", 1415 "@babel/code-frame": "^7.0.0",
1470 "builtin-modules": "^1.1.1", 1416 "builtin-modules": "^1.1.1",
1471 "chalk": "^2.3.0", 1417 "chalk": "^2.3.0",
1472 "commander": "^2.12.1", 1418 "commander": "^2.12.1",
1473 "diff": "^3.2.0", 1419 "diff": "^4.0.1",
1474 "glob": "^7.1.1", 1420 "glob": "^7.1.1",
1475 "js-yaml": "^3.13.1", 1421 "js-yaml": "^3.13.1",
1476 "minimatch": "^3.0.4", 1422 "minimatch": "^3.0.4",
@@ -1479,6 +1425,14 @@
1479 "semver": "^5.3.0", 1425 "semver": "^5.3.0",
1480 "tslib": "^1.8.0", 1426 "tslib": "^1.8.0",
1481 "tsutils": "^2.29.0" 1427 "tsutils": "^2.29.0"
1428 },
1429 "dependencies": {
1430 "diff": {
1431 "version": "4.0.1",
1432 "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
1433 "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
1434 "dev": true
1435 }
1482 } 1436 }
1483 }, 1437 },
1484 "tslint-config-prettier": { 1438 "tslint-config-prettier": {
@@ -1487,6 +1441,17 @@
1487 "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", 1441 "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
1488 "dev": true 1442 "dev": true
1489 }, 1443 },
1444 "tslint-plugin-prettier": {
1445 "version": "2.0.1",
1446 "resolved": "https://registry.npmjs.org/tslint-plugin-prettier/-/tslint-plugin-prettier-2.0.1.tgz",
1447 "integrity": "sha512-4FX9JIx/1rKHIPJNfMb+ooX1gPk5Vg3vNi7+dyFYpLO+O57F4g+b/fo1+W/G0SUOkBLHB/YKScxjX/P+7ZT/Tw==",
1448 "dev": true,
1449 "requires": {
1450 "eslint-plugin-prettier": "^2.2.0",
1451 "lines-and-columns": "^1.1.6",
1452 "tslib": "^1.7.1"
1453 }
1454 },
1490 "tsutils": { 1455 "tsutils": {
1491 "version": "2.29.0", 1456 "version": "2.29.0",
1492 "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", 1457 "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
@@ -1513,9 +1478,9 @@
1513 } 1478 }
1514 }, 1479 },
1515 "typescript": { 1480 "typescript": {
1516 "version": "3.5.3", 1481 "version": "3.7.3",
1517 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", 1482 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz",
1518 "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", 1483 "integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==",
1519 "dev": true 1484 "dev": true
1520 }, 1485 },
1521 "uc.micro": { 1486 "uc.micro": {
@@ -1530,6 +1495,12 @@
1530 "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", 1495 "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
1531 "dev": true 1496 "dev": true
1532 }, 1497 },
1498 "urix": {
1499 "version": "0.1.0",
1500 "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
1501 "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
1502 "dev": true
1503 },
1533 "url-join": { 1504 "url-join": {
1534 "version": "1.1.0", 1505 "version": "1.1.0",
1535 "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz", 1506 "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz",
@@ -1543,9 +1514,9 @@
1543 "dev": true 1514 "dev": true
1544 }, 1515 },
1545 "vsce": { 1516 "vsce": {
1546 "version": "1.67.1", 1517 "version": "1.71.0",
1547 "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.67.1.tgz", 1518 "resolved": "https://registry.npmjs.org/vsce/-/vsce-1.71.0.tgz",
1548 "integrity": "sha512-Y/0fnfaLs2cCfytTGmy4Cp1bf9BaxHO7020YePdUwxjAlPlZ9+lm74M9yEFEWXTIug0L0sMax1WMz0TnozIqxg==", 1519 "integrity": "sha512-7k+LPC4oJYPyyxs0a5nh4A8CleQ6+2EMPiAiX/bDyN+PmwJFm2FFPqLRxdIsIWfFnkW4ZMQBf10+W62dCRd9kQ==",
1549 "dev": true, 1520 "dev": true,
1550 "requires": { 1521 "requires": {
1551 "azure-devops-node-api": "^7.2.0", 1522 "azure-devops-node-api": "^7.2.0",
@@ -1571,41 +1542,48 @@
1571 } 1542 }
1572 }, 1543 },
1573 "vscode-jsonrpc": { 1544 "vscode-jsonrpc": {
1574 "version": "4.1.0-next.3", 1545 "version": "5.0.0-next.5",
1575 "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-4.1.0-next.3.tgz", 1546 "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.0-next.5.tgz",
1576 "integrity": "sha512-Z6oxBiMks2+UADV1QHXVooSakjyhI+eHTnXzDyVvVMmegvSfkXk2w6mPEdSkaNHFBdtWW7n20H1yw2nA3A17mg==" 1547 "integrity": "sha512-k9akfglxWgr0dtLNscq2uBq48XJwnhf4EaDxn05KQowRwR0DkNML0zeYqFRLtXZe6x5vpL5ppyu4o6GqL+23YQ=="
1577 }, 1548 },
1578 "vscode-languageclient": { 1549 "vscode-languageclient": {
1579 "version": "5.3.0-next.4", 1550 "version": "6.0.0-next.9",
1580 "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-5.3.0-next.4.tgz", 1551 "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-6.0.0-next.9.tgz",
1581 "integrity": "sha512-RODuzXErVpJRSgHv+Xei8fwQtZ/iZOWPCqlLl07NTtkzgTAepJf9r4EioZVuTviGJ5DEJ9xs0bjrit8shKtW6Q==", 1552 "integrity": "sha512-NEpeeFM9FKrrRqlBHXGfwpkhtnjruDz3zfFBP+Cymr10qigAEtE/JsODJsIG/ErGqjh3/JXxu8SUOVTGu5oK+w==",
1582 "requires": { 1553 "requires": {
1583 "semver": "^5.5.0", 1554 "semver": "^6.3.0",
1584 "vscode-languageserver-protocol": "3.15.0-next.4" 1555 "vscode-languageserver-protocol": "^3.15.0-next.14"
1556 },
1557 "dependencies": {
1558 "semver": {
1559 "version": "6.3.0",
1560 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1561 "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
1562 }
1585 } 1563 }
1586 }, 1564 },
1587 "vscode-languageserver-protocol": { 1565 "vscode-languageserver-protocol": {
1588 "version": "3.15.0-next.4", 1566 "version": "3.15.0-next.14",
1589 "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.4.tgz", 1567 "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.0-next.14.tgz",
1590 "integrity": "sha512-4AgisQ8GWa3irdRu3/UNr3brcSSm0oobmoV1eSOnV7JM32lYyXDnSKB7RuTTXvaAjD/0xQJLEGhkyGHS5gbywA==", 1568 "integrity": "sha512-xUwwno6Q6RFd2Z2EWV9D3dQlsKPnHyiZMNWq+EC7JJdp2WH1gRlD+KPX4UGRCnJK0WI5omqHV313IESPwRY5xA==",
1591 "requires": { 1569 "requires": {
1592 "vscode-jsonrpc": "^4.1.0-next.1", 1570 "vscode-jsonrpc": "^5.0.0-next.5",
1593 "vscode-languageserver-types": "3.15.0-next.1" 1571 "vscode-languageserver-types": "^3.15.0-next.9"
1594 } 1572 }
1595 }, 1573 },
1596 "vscode-languageserver-types": { 1574 "vscode-languageserver-types": {
1597 "version": "3.15.0-next.1", 1575 "version": "3.15.0-next.9",
1598 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.1.tgz", 1576 "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.0-next.9.tgz",
1599 "integrity": "sha512-R0kzmaI8gOGEoU7b9huYQAzgZzRQ/5Q8HKjsIUdfz0MjXcBZ4tr1ik1So1p1O5kGrI1VTCd22Fw/wI7ECGoIPw==" 1577 "integrity": "sha512-Rl/8qJ6932nrHCdPn+9y0x08uLVQaSLRG+U4JzhyKpWU4eJbVaDRoAcz1Llj7CErJGbPr6kdBvShPy5fRfR+Uw=="
1600 }, 1578 },
1601 "vscode-test": { 1579 "vscode-test": {
1602 "version": "1.2.0", 1580 "version": "1.3.0",
1603 "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.2.0.tgz", 1581 "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.3.0.tgz",
1604 "integrity": "sha512-aowqgc8gZe0eflzVUXsBjBrlsJ8eC35kfgfSEeHu9PKA1vQKm/3rVK43TlbxGue8hKtZBElNAJ5QuYklR/vLJA==", 1582 "integrity": "sha512-LddukcBiSU2FVTDr3c1D8lwkiOvwlJdDL2hqVbn6gIz+rpTqUCkMZSKYm94Y1v0WXlHSDQBsXyY+tchWQgGVsw==",
1605 "dev": true, 1583 "dev": true,
1606 "requires": { 1584 "requires": {
1607 "http-proxy-agent": "^2.1.0", 1585 "http-proxy-agent": "^2.1.0",
1608 "https-proxy-agent": "^2.2.1", 1586 "https-proxy-agent": "^2.2.4",
1609 "rimraf": "^2.6.3" 1587 "rimraf": "^2.6.3"
1610 } 1588 }
1611 }, 1589 },
@@ -1634,48 +1612,40 @@
1634 } 1612 }
1635 }, 1613 },
1636 "wrap-ansi": { 1614 "wrap-ansi": {
1637 "version": "2.1.0", 1615 "version": "5.1.0",
1638 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", 1616 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
1639 "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", 1617 "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
1640 "dev": true, 1618 "dev": true,
1641 "requires": { 1619 "requires": {
1642 "string-width": "^1.0.1", 1620 "ansi-styles": "^3.2.0",
1643 "strip-ansi": "^3.0.1" 1621 "string-width": "^3.0.0",
1622 "strip-ansi": "^5.0.0"
1644 }, 1623 },
1645 "dependencies": { 1624 "dependencies": {
1646 "ansi-regex": { 1625 "ansi-regex": {
1647 "version": "2.1.1", 1626 "version": "4.1.0",
1648 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 1627 "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
1649 "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", 1628 "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
1650 "dev": true 1629 "dev": true
1651 }, 1630 },
1652 "is-fullwidth-code-point": {
1653 "version": "1.0.0",
1654 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
1655 "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
1656 "dev": true,
1657 "requires": {
1658 "number-is-nan": "^1.0.0"
1659 }
1660 },
1661 "string-width": { 1631 "string-width": {
1662 "version": "1.0.2", 1632 "version": "3.1.0",
1663 "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", 1633 "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1664 "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", 1634 "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1665 "dev": true, 1635 "dev": true,
1666 "requires": { 1636 "requires": {
1667 "code-point-at": "^1.0.0", 1637 "emoji-regex": "^7.0.1",
1668 "is-fullwidth-code-point": "^1.0.0", 1638 "is-fullwidth-code-point": "^2.0.0",
1669 "strip-ansi": "^3.0.0" 1639 "strip-ansi": "^5.1.0"
1670 } 1640 }
1671 }, 1641 },
1672 "strip-ansi": { 1642 "strip-ansi": {
1673 "version": "3.0.1", 1643 "version": "5.2.0",
1674 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 1644 "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1675 "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 1645 "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1676 "dev": true, 1646 "dev": true,
1677 "requires": { 1647 "requires": {
1678 "ansi-regex": "^2.0.0" 1648 "ansi-regex": "^4.1.0"
1679 } 1649 }
1680 } 1650 }
1681 } 1651 }
@@ -1693,22 +1663,21 @@
1693 "dev": true 1663 "dev": true
1694 }, 1664 },
1695 "yargs": { 1665 "yargs": {
1696 "version": "13.2.2", 1666 "version": "13.3.0",
1697 "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", 1667 "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz",
1698 "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", 1668 "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==",
1699 "dev": true, 1669 "dev": true,
1700 "requires": { 1670 "requires": {
1701 "cliui": "^4.0.0", 1671 "cliui": "^5.0.0",
1702 "find-up": "^3.0.0", 1672 "find-up": "^3.0.0",
1703 "get-caller-file": "^2.0.1", 1673 "get-caller-file": "^2.0.1",
1704 "os-locale": "^3.1.0",
1705 "require-directory": "^2.1.1", 1674 "require-directory": "^2.1.1",
1706 "require-main-filename": "^2.0.0", 1675 "require-main-filename": "^2.0.0",
1707 "set-blocking": "^2.0.0", 1676 "set-blocking": "^2.0.0",
1708 "string-width": "^3.0.0", 1677 "string-width": "^3.0.0",
1709 "which-module": "^2.0.0", 1678 "which-module": "^2.0.0",
1710 "y18n": "^4.0.0", 1679 "y18n": "^4.0.0",
1711 "yargs-parser": "^13.0.0" 1680 "yargs-parser": "^13.1.1"
1712 }, 1681 },
1713 "dependencies": { 1682 "dependencies": {
1714 "ansi-regex": { 1683 "ansi-regex": {
@@ -1740,9 +1709,9 @@
1740 } 1709 }
1741 }, 1710 },
1742 "yargs-parser": { 1711 "yargs-parser": {
1743 "version": "13.0.0", 1712 "version": "13.1.1",
1744 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", 1713 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
1745 "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", 1714 "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
1746 "dev": true, 1715 "dev": true,
1747 "requires": { 1716 "requires": {
1748 "camelcase": "^5.0.0", 1717 "camelcase": "^5.0.0",
@@ -1750,58 +1719,14 @@
1750 } 1719 }
1751 }, 1720 },
1752 "yargs-unparser": { 1721 "yargs-unparser": {
1753 "version": "1.5.0", 1722 "version": "1.6.0",
1754 "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", 1723 "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
1755 "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", 1724 "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
1756 "dev": true, 1725 "dev": true,
1757 "requires": { 1726 "requires": {
1758 "flat": "^4.1.0", 1727 "flat": "^4.1.0",
1759 "lodash": "^4.17.11", 1728 "lodash": "^4.17.15",
1760 "yargs": "^12.0.5" 1729 "yargs": "^13.3.0"
1761 },
1762 "dependencies": {
1763 "get-caller-file": {
1764 "version": "1.0.3",
1765 "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
1766 "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
1767 "dev": true
1768 },
1769 "require-main-filename": {
1770 "version": "1.0.1",
1771 "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
1772 "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
1773 "dev": true
1774 },
1775 "yargs": {
1776 "version": "12.0.5",
1777 "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
1778 "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
1779 "dev": true,
1780 "requires": {
1781 "cliui": "^4.0.0",
1782 "decamelize": "^1.2.0",
1783 "find-up": "^3.0.0",
1784 "get-caller-file": "^1.0.1",
1785 "os-locale": "^3.0.0",
1786 "require-directory": "^2.1.1",
1787 "require-main-filename": "^1.0.1",
1788 "set-blocking": "^2.0.0",
1789 "string-width": "^2.0.0",
1790 "which-module": "^2.0.0",
1791 "y18n": "^3.2.1 || ^4.0.0",
1792 "yargs-parser": "^11.1.1"
1793 }
1794 },
1795 "yargs-parser": {
1796 "version": "11.1.1",
1797 "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
1798 "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
1799 "dev": true,
1800 "requires": {
1801 "camelcase": "^5.0.0",
1802 "decamelize": "^1.2.0"
1803 }
1804 }
1805 } 1730 }
1806 }, 1731 },
1807 "yauzl": { 1732 "yauzl": {
diff --git a/editors/code/package.json b/editors/code/package.json
index e21dfa174..8e7046418 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -13,7 +13,7 @@
13 "Other" 13 "Other"
14 ], 14 ],
15 "engines": { 15 "engines": {
16 "vscode": "^1.37.0" 16 "vscode": "^1.41.0"
17 }, 17 },
18 "scripts": { 18 "scripts": {
19 "vscode:prepublish": "npm run compile", 19 "vscode:prepublish": "npm run compile",
@@ -27,33 +27,37 @@
27 "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --write && git diff --exit-code" 27 "travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --write && git diff --exit-code"
28 }, 28 },
29 "prettier": { 29 "prettier": {
30 "singleQuote": true,
30 "tabWidth": 4, 31 "tabWidth": 4,
31 "singleQuote": true 32 "trailingComma": "all"
32 }, 33 },
33 "dependencies": { 34 "dependencies": {
34 "seedrandom": "^3.0.1", 35 "lookpath": "^1.0.4",
35 "vscode-languageclient": "^5.3.0-next.4", 36 "seedrandom": "^3.0.5",
37 "vscode-languageclient": "^6.0.0-next.9",
36 "jsonc-parser": "^2.1.0" 38 "jsonc-parser": "^2.1.0"
37 }, 39 },
38 "devDependencies": { 40 "devDependencies": {
39 "@types/glob": "^7.1.1", 41 "@types/glob": "^7.1.1",
40 "@types/mocha": "^5.2.7", 42 "@types/mocha": "^5.2.7",
41 "@types/node": "^10.14.13", 43 "@types/node": "^12.12.21",
42 "@types/seedrandom": "^2.4.28", 44 "@types/seedrandom": "^2.4.28",
43 "@types/vscode": "^1.37.0", 45 "@types/vscode": "^1.41.0",
44 "glob": "^7.1.4", 46 "glob": "^7.1.6",
45 "mocha": "^6.2.0", 47 "mocha": "^6.2.2",
46 "prettier": "^1.18.2", 48 "prettier": "^1.19.1",
47 "rollup": "^1.23.1", 49 "rollup": "^1.27.13",
48 "rollup-plugin-commonjs": "^10.1.0", 50 "rollup-plugin-commonjs": "^10.1.0",
49 "rollup-plugin-node-resolve": "^5.2.0", 51 "rollup-plugin-node-resolve": "^5.2.0",
52 "rollup-plugin-sourcemaps": "^0.4.2",
50 "rollup-plugin-typescript": "^1.0.1", 53 "rollup-plugin-typescript": "^1.0.1",
51 "shx": "^0.3.1", 54 "shx": "^0.3.1",
52 "tslint": "^5.18.0", 55 "tslint": "^5.20.1",
53 "tslint-config-prettier": "^1.18.0", 56 "tslint-config-prettier": "^1.18.0",
54 "typescript": "^3.5.3", 57 "tslint-plugin-prettier": "^2.0.1",
55 "vsce": "^1.67.0", 58 "typescript": "^3.7.3",
56 "vscode-test": "^1.2.0" 59 "vsce": "^1.71.0",
60 "vscode-test": "^1.3.0"
57 }, 61 },
58 "activationEvents": [ 62 "activationEvents": [
59 "onLanguage:rust", 63 "onLanguage:rust",
@@ -279,7 +283,7 @@
279 }, 283 },
280 "rust-analyzer.useClientWatching": { 284 "rust-analyzer.useClientWatching": {
281 "type": "boolean", 285 "type": "boolean",
282 "default": false, 286 "default": true,
283 "description": "client provided file watching instead of notify watching." 287 "description": "client provided file watching instead of notify watching."
284 }, 288 },
285 "rust-analyzer.cargo-watch.arguments": { 289 "rust-analyzer.cargo-watch.arguments": {
@@ -297,6 +301,11 @@
297 "description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)", 301 "description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)",
298 "default": [] 302 "default": []
299 }, 303 },
304 "rust-analyzer.cargo-watch.allTargets": {
305 "type": "boolean",
306 "description": "Check all targets and tests (will be passed as `--all-targets`)",
307 "default": true
308 },
300 "rust-analyzer.trace.server": { 309 "rust-analyzer.trace.server": {
301 "type": "string", 310 "type": "string",
302 "scope": "window", 311 "scope": "window",
@@ -338,6 +347,21 @@
338 "type": "number", 347 "type": "number",
339 "default": 20, 348 "default": 20,
340 "description": "Maximum length for inlay hints" 349 "description": "Maximum length for inlay hints"
350 },
351 "rust-analyzer.cargoFeatures.noDefaultFeatures": {
352 "type": "boolean",
353 "default": false,
354 "description": "Do not activate the `default` feature"
355 },
356 "rust-analyzer.cargoFeatures.allFeatures": {
357 "type": "boolean",
358 "default": true,
359 "description": "Activate all available features"
360 },
361 "rust-analyzer.cargoFeatures.features": {
362 "type": "array",
363 "default": [],
364 "description": "List of features to activate"
341 } 365 }
342 } 366 }
343 }, 367 },
@@ -358,6 +382,20 @@
358 "column": 3 382 "column": 3
359 } 383 }
360 ] 384 ]
385 },
386 {
387 "name": "rustc-json",
388 "patterns": [
389 {
390 "regexp": "^.*\"message\":{\"message\":\"([^\"]*).*?\"file_name\":\"([^\"]+).*?\"line_start\":(\\d+).*?\"line_end\":(\\d+).*?\"column_start\":(\\d+).*?\"column_end\":(\\d+).*}$",
391 "message": 1,
392 "file": 2,
393 "line": 3,
394 "endLine": 4,
395 "column": 5,
396 "endColumn": 6
397 }
398 ]
361 } 399 }
362 ], 400 ],
363 "problemMatchers": [ 401 "problemMatchers": [
@@ -370,6 +408,14 @@
370 "pattern": "$rustc" 408 "pattern": "$rustc"
371 }, 409 },
372 { 410 {
411 "name": "rustc-json",
412 "fileLocation": [
413 "relative",
414 "${workspaceRoot}"
415 ],
416 "pattern": "$rustc-json"
417 },
418 {
373 "name": "rustc-watch", 419 "name": "rustc-watch",
374 "fileLocation": [ 420 "fileLocation": [
375 "relative", 421 "relative",
@@ -483,6 +529,33 @@
483 } 529 }
484 }, 530 },
485 { 531 {
532 "id": "ralsp.literal.numeric",
533 "description": "Color for numeric literals",
534 "defaults": {
535 "dark": "#BECEA8",
536 "light": "#09885A",
537 "highContrast": "#B5CEA8"
538 }
539 },
540 {
541 "id": "ralsp.literal.char",
542 "description": "Color for character literals",
543 "defaults": {
544 "dark": "#BECEA8",
545 "light": "#09885A",
546 "highContrast": "#B5CEA8"
547 }
548 },
549 {
550 "id": "ralsp.literal.byte",
551 "description": "Color for byte literals",
552 "defaults": {
553 "dark": "#BECEA8",
554 "light": "#09885A",
555 "highContrast": "#B5CEA8"
556 }
557 },
558 {
486 "id": "ralsp.macro", 559 "id": "ralsp.macro",
487 "description": "Color for macros", 560 "description": "Color for macros",
488 "defaults": { 561 "defaults": {
@@ -502,7 +575,43 @@
502 }, 575 },
503 { 576 {
504 "id": "ralsp.type", 577 "id": "ralsp.type",
505 "description": "Color for types", 578 "description": "Color for other types (traits, aliases..)",
579 "defaults": {
580 "dark": "#4EC9B0",
581 "light": "#267F99",
582 "highContrast": "#4EC9B0"
583 }
584 },
585 {
586 "id": "ralsp.type.builtin",
587 "description": "Color for built-in types (&str, bool, u16, u32)",
588 "defaults": {
589 "dark": "#4EC9B0",
590 "light": "#267F99",
591 "highContrast": "#4EC9B0"
592 }
593 },
594 {
595 "id": "ralsp.type.lifetime",
596 "description": "Color for lifetimes parameters",
597 "defaults": {
598 "dark": "#4EC9B0",
599 "light": "#267F99",
600 "highContrast": "#4EC9B0"
601 }
602 },
603 {
604 "id": "ralsp.type.self",
605 "description": "Color for `Self` param type",
606 "defaults": {
607 "dark": "#4EC9B0",
608 "light": "#267F99",
609 "highContrast": "#4EC9B0"
610 }
611 },
612 {
613 "id": "ralsp.type.param",
614 "description": "Color for type parameters",
506 "defaults": { 615 "defaults": {
507 "dark": "#4EC9B0", 616 "dark": "#4EC9B0",
508 "light": "#267F99", 617 "light": "#267F99",
diff --git a/editors/code/rollup.config.js b/editors/code/rollup.config.js
index a023b8c3f..1b222bbe7 100644
--- a/editors/code/rollup.config.js
+++ b/editors/code/rollup.config.js
@@ -1,12 +1,14 @@
1import typescript from 'rollup-plugin-typescript'; 1import typescript from 'rollup-plugin-typescript';
2import resolve from 'rollup-plugin-node-resolve'; 2import resolve from 'rollup-plugin-node-resolve';
3import commonjs from 'rollup-plugin-commonjs'; 3import commonjs from 'rollup-plugin-commonjs';
4import sourcemaps from 'rollup-plugin-sourcemaps'
4import nodeBuiltins from 'builtin-modules'; 5import nodeBuiltins from 'builtin-modules';
5 6
6export default { 7export default {
7 input: './src/extension.ts', 8 input: './src/extension.ts',
8 plugins: [ 9 plugins: [
9 typescript(), 10 typescript(),
11 sourcemaps(),
10 resolve(), 12 resolve(),
11 commonjs({ 13 commonjs({
12 namedExports: { 14 namedExports: {
@@ -22,6 +24,7 @@ export default {
22 ], 24 ],
23 output: { 25 output: {
24 file: './bundle/extension.js', 26 file: './bundle/extension.js',
27 sourcemap: true,
25 format: 'cjs', 28 format: 'cjs',
26 } 29 }
27}; 30};
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts
index 63f82c92d..2777ced24 100644
--- a/editors/code/src/commands/analyzer_status.ts
+++ b/editors/code/src/commands/analyzer_status.ts
@@ -9,7 +9,7 @@ export class TextDocumentContentProvider
9 public syntaxTree: string = 'Not available'; 9 public syntaxTree: string = 'Not available';
10 10
11 public provideTextDocumentContent( 11 public provideTextDocumentContent(
12 uri: vscode.Uri 12 _uri: vscode.Uri,
13 ): vscode.ProviderResult<string> { 13 ): vscode.ProviderResult<string> {
14 const editor = vscode.window.activeTextEditor; 14 const editor = vscode.window.activeTextEditor;
15 if (editor == null) { 15 if (editor == null) {
@@ -17,7 +17,7 @@ export class TextDocumentContentProvider
17 } 17 }
18 return Server.client.sendRequest<string>( 18 return Server.client.sendRequest<string>(
19 'rust-analyzer/analyzerStatus', 19 'rust-analyzer/analyzerStatus',
20 null 20 null,
21 ); 21 );
22 } 22 }
23 23
@@ -35,8 +35,8 @@ export function makeCommand(context: vscode.ExtensionContext) {
35 context.subscriptions.push( 35 context.subscriptions.push(
36 vscode.workspace.registerTextDocumentContentProvider( 36 vscode.workspace.registerTextDocumentContentProvider(
37 'rust-analyzer-status', 37 'rust-analyzer-status',
38 textDocumentContentProvider 38 textDocumentContentProvider,
39 ) 39 ),
40 ); 40 );
41 41
42 context.subscriptions.push({ 42 context.subscriptions.push({
@@ -44,21 +44,21 @@ export function makeCommand(context: vscode.ExtensionContext) {
44 if (poller != null) { 44 if (poller != null) {
45 clearInterval(poller); 45 clearInterval(poller);
46 } 46 }
47 } 47 },
48 }); 48 });
49 49
50 return async function handle() { 50 return async function handle() {
51 if (poller == null) { 51 if (poller == null) {
52 poller = setInterval( 52 poller = setInterval(
53 () => textDocumentContentProvider.eventEmitter.fire(statusUri), 53 () => textDocumentContentProvider.eventEmitter.fire(statusUri),
54 1000 54 1000,
55 ); 55 );
56 } 56 }
57 const document = await vscode.workspace.openTextDocument(statusUri); 57 const document = await vscode.workspace.openTextDocument(statusUri);
58 return vscode.window.showTextDocument( 58 return vscode.window.showTextDocument(
59 document, 59 document,
60 vscode.ViewColumn.Two, 60 vscode.ViewColumn.Two,
61 true 61 true,
62 ); 62 );
63 }; 63 };
64} 64}
diff --git a/editors/code/src/commands/apply_source_change.ts b/editors/code/src/commands/apply_source_change.ts
index dcd074b8b..8167398b1 100644
--- a/editors/code/src/commands/apply_source_change.ts
+++ b/editors/code/src/commands/apply_source_change.ts
@@ -11,7 +11,7 @@ export interface SourceChange {
11 11
12export async function handle(change: SourceChange) { 12export async function handle(change: SourceChange) {
13 const wsEdit = Server.client.protocol2CodeConverter.asWorkspaceEdit( 13 const wsEdit = Server.client.protocol2CodeConverter.asWorkspaceEdit(
14 change.workspaceEdit 14 change.workspaceEdit,
15 ); 15 );
16 let created; 16 let created;
17 let moved; 17 let moved;
@@ -33,10 +33,10 @@ export async function handle(change: SourceChange) {
33 await vscode.window.showTextDocument(doc); 33 await vscode.window.showTextDocument(doc);
34 } else if (toReveal) { 34 } else if (toReveal) {
35 const uri = Server.client.protocol2CodeConverter.asUri( 35 const uri = Server.client.protocol2CodeConverter.asUri(
36 toReveal.textDocument.uri 36 toReveal.textDocument.uri,
37 ); 37 );
38 const position = Server.client.protocol2CodeConverter.asPosition( 38 const position = Server.client.protocol2CodeConverter.asPosition(
39 toReveal.position 39 toReveal.position,
40 ); 40 );
41 const editor = vscode.window.activeTextEditor; 41 const editor = vscode.window.activeTextEditor;
42 if (!editor || editor.document.uri.toString() !== uri.toString()) { 42 if (!editor || editor.document.uri.toString() !== uri.toString()) {
@@ -48,7 +48,7 @@ export async function handle(change: SourceChange) {
48 editor.selection = new vscode.Selection(position, position); 48 editor.selection = new vscode.Selection(position, position);
49 editor.revealRange( 49 editor.revealRange(
50 new vscode.Range(position, position), 50 new vscode.Range(position, position),
51 vscode.TextEditorRevealType.Default 51 vscode.TextEditorRevealType.Default,
52 ); 52 );
53 } 53 }
54} 54}
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
index 59d4ba97a..ac62bdd48 100644
--- a/editors/code/src/commands/cargo_watch.ts
+++ b/editors/code/src/commands/cargo_watch.ts
@@ -9,13 +9,13 @@ import { StatusDisplay } from './watch_status';
9 9
10import { 10import {
11 mapRustDiagnosticToVsCode, 11 mapRustDiagnosticToVsCode,
12 RustDiagnostic 12 RustDiagnostic,
13} from '../utils/diagnostics/rust'; 13} from '../utils/diagnostics/rust';
14import SuggestedFixCollection from '../utils/diagnostics/SuggestedFixCollection'; 14import SuggestedFixCollection from '../utils/diagnostics/SuggestedFixCollection';
15import { areDiagnosticsEqual } from '../utils/diagnostics/vscode'; 15import { areDiagnosticsEqual } from '../utils/diagnostics/vscode';
16 16
17export async function registerCargoWatchProvider( 17export async function registerCargoWatchProvider(
18 subscriptions: vscode.Disposable[] 18 subscriptions: vscode.Disposable[],
19): Promise<CargoWatchProvider | undefined> { 19): Promise<CargoWatchProvider | undefined> {
20 let cargoExists = false; 20 let cargoExists = false;
21 21
@@ -30,7 +30,7 @@ export async function registerCargoWatchProvider(
30 30
31 if (!cargoExists) { 31 if (!cargoExists) {
32 vscode.window.showErrorMessage( 32 vscode.window.showErrorMessage(
33 `Couldn\'t find \'Cargo.toml\' at ${cargoTomlPath}` 33 `Couldn\'t find \'Cargo.toml\' at ${cargoTomlPath}`,
34 ); 34 );
35 return; 35 return;
36 } 36 }
@@ -52,13 +52,13 @@ export class CargoWatchProvider implements vscode.Disposable {
52 52
53 constructor() { 53 constructor() {
54 this.diagnosticCollection = vscode.languages.createDiagnosticCollection( 54 this.diagnosticCollection = vscode.languages.createDiagnosticCollection(
55 'rustc' 55 'rustc',
56 ); 56 );
57 this.statusDisplay = new StatusDisplay( 57 this.statusDisplay = new StatusDisplay(
58 Server.config.cargoWatchOptions.command 58 Server.config.cargoWatchOptions.command,
59 ); 59 );
60 this.outputChannel = vscode.window.createOutputChannel( 60 this.outputChannel = vscode.window.createOutputChannel(
61 'Cargo Watch Trace' 61 'Cargo Watch Trace',
62 ); 62 );
63 63
64 // Track `rustc`'s suggested fixes so we can convert them to code actions 64 // Track `rustc`'s suggested fixes so we can convert them to code actions
@@ -68,22 +68,24 @@ export class CargoWatchProvider implements vscode.Disposable {
68 this.suggestedFixCollection, 68 this.suggestedFixCollection,
69 { 69 {
70 providedCodeActionKinds: 70 providedCodeActionKinds:
71 SuggestedFixCollection.PROVIDED_CODE_ACTION_KINDS 71 SuggestedFixCollection.PROVIDED_CODE_ACTION_KINDS,
72 } 72 },
73 ); 73 );
74 } 74 }
75 75
76 public start() { 76 public start() {
77 if (this.cargoProcess) { 77 if (this.cargoProcess) {
78 vscode.window.showInformationMessage( 78 vscode.window.showInformationMessage(
79 'Cargo Watch is already running' 79 'Cargo Watch is already running',
80 ); 80 );
81 return; 81 return;
82 } 82 }
83 83
84 let args = 84 let args =
85 Server.config.cargoWatchOptions.command + 85 Server.config.cargoWatchOptions.command + ' --message-format json';
86 ' --all-targets --message-format json'; 86 if (Server.config.cargoWatchOptions.allTargets) {
87 args += ' --all-targets';
88 }
87 if (Server.config.cargoWatchOptions.command.length > 0) { 89 if (Server.config.cargoWatchOptions.command.length > 0) {
88 // Excape the double quote string: 90 // Excape the double quote string:
89 args += ' ' + Server.config.cargoWatchOptions.arguments; 91 args += ' ' + Server.config.cargoWatchOptions.arguments;
@@ -95,7 +97,7 @@ export class CargoWatchProvider implements vscode.Disposable {
95 97
96 const ignoreFlags = Server.config.cargoWatchOptions.ignore.reduce( 98 const ignoreFlags = Server.config.cargoWatchOptions.ignore.reduce(
97 (flags, pattern) => [...flags, '--ignore', pattern], 99 (flags, pattern) => [...flags, '--ignore', pattern],
98 [] as string[] 100 [] as string[],
99 ); 101 );
100 102
101 // Start the cargo watch with json message 103 // Start the cargo watch with json message
@@ -105,12 +107,17 @@ export class CargoWatchProvider implements vscode.Disposable {
105 { 107 {
106 stdio: ['ignore', 'pipe', 'pipe'], 108 stdio: ['ignore', 'pipe', 'pipe'],
107 cwd: vscode.workspace.rootPath, 109 cwd: vscode.workspace.rootPath,
108 windowsVerbatimArguments: true 110 windowsVerbatimArguments: true,
109 } 111 },
110 ); 112 );
111 113
114 if (!this.cargoProcess) {
115 vscode.window.showErrorMessage('Cargo Watch failed to start');
116 return;
117 }
118
112 const stdoutData = new LineBuffer(); 119 const stdoutData = new LineBuffer();
113 this.cargoProcess.stdout.on('data', (s: string) => { 120 this.cargoProcess.stdout?.on('data', (s: string) => {
114 stdoutData.processOutput(s, line => { 121 stdoutData.processOutput(s, line => {
115 this.logInfo(line); 122 this.logInfo(line);
116 try { 123 try {
@@ -122,7 +129,7 @@ export class CargoWatchProvider implements vscode.Disposable {
122 }); 129 });
123 130
124 const stderrData = new LineBuffer(); 131 const stderrData = new LineBuffer();
125 this.cargoProcess.stderr.on('data', (s: string) => { 132 this.cargoProcess.stderr?.on('data', (s: string) => {
126 stderrData.processOutput(s, line => { 133 stderrData.processOutput(s, line => {
127 this.logError('Error on cargo-watch : {\n' + line + '}\n'); 134 this.logError('Error on cargo-watch : {\n' + line + '}\n');
128 }); 135 });
@@ -130,7 +137,7 @@ export class CargoWatchProvider implements vscode.Disposable {
130 137
131 this.cargoProcess.on('error', (err: Error) => { 138 this.cargoProcess.on('error', (err: Error) => {
132 this.logError( 139 this.logError(
133 'Error on cargo-watch process : {\n' + err.message + '}\n' 140 'Error on cargo-watch process : {\n' + err.message + '}\n',
134 ); 141 );
135 }); 142 });
136 143
@@ -223,12 +230,12 @@ export class CargoWatchProvider implements vscode.Disposable {
223 const fileUri = location.uri; 230 const fileUri = location.uri;
224 231
225 const diagnostics: vscode.Diagnostic[] = [ 232 const diagnostics: vscode.Diagnostic[] = [
226 ...(this.diagnosticCollection!.get(fileUri) || []) 233 ...(this.diagnosticCollection!.get(fileUri) || []),
227 ]; 234 ];
228 235
229 // If we're building multiple targets it's possible we've already seen this diagnostic 236 // If we're building multiple targets it's possible we've already seen this diagnostic
230 const isDuplicate = diagnostics.some(d => 237 const isDuplicate = diagnostics.some(d =>
231 areDiagnosticsEqual(d, diagnostic) 238 areDiagnosticsEqual(d, diagnostic),
232 ); 239 );
233 if (isDuplicate) { 240 if (isDuplicate) {
234 return; 241 return;
@@ -241,7 +248,7 @@ export class CargoWatchProvider implements vscode.Disposable {
241 for (const suggestedFix of suggestedFixes) { 248 for (const suggestedFix of suggestedFixes) {
242 this.suggestedFixCollection.addSuggestedFixForDiagnostic( 249 this.suggestedFixCollection.addSuggestedFixForDiagnostic(
243 suggestedFix, 250 suggestedFix,
244 diagnostic 251 diagnostic,
245 ); 252 );
246 } 253 }
247 254
@@ -249,7 +256,7 @@ export class CargoWatchProvider implements vscode.Disposable {
249 vscode.commands.executeCommand( 256 vscode.commands.executeCommand(
250 'vscode.executeCodeActionProvider', 257 'vscode.executeCodeActionProvider',
251 fileUri, 258 fileUri,
252 diagnostic.range 259 diagnostic.range,
253 ); 260 );
254 } 261 }
255 } 262 }
diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts
index 34e0c8fb3..17c78280a 100644
--- a/editors/code/src/commands/expand_macro.ts
+++ b/editors/code/src/commands/expand_macro.ts
@@ -3,7 +3,7 @@ import { Position, TextDocumentIdentifier } from 'vscode-languageclient';
3import { Server } from '../server'; 3import { Server } from '../server';
4 4
5export const expandMacroUri = vscode.Uri.parse( 5export const expandMacroUri = vscode.Uri.parse(
6 'rust-analyzer://expandMacro/[EXPANSION].rs' 6 'rust-analyzer://expandMacro/[EXPANSION].rs',
7); 7);
8 8
9export class ExpandMacroContentProvider 9export class ExpandMacroContentProvider
@@ -11,7 +11,7 @@ export class ExpandMacroContentProvider
11 public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 11 public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
12 12
13 public provideTextDocumentContent( 13 public provideTextDocumentContent(
14 uri: vscode.Uri 14 _uri: vscode.Uri,
15 ): vscode.ProviderResult<string> { 15 ): vscode.ProviderResult<string> {
16 async function handle() { 16 async function handle() {
17 const editor = vscode.window.activeTextEditor; 17 const editor = vscode.window.activeTextEditor;
@@ -22,11 +22,11 @@ export class ExpandMacroContentProvider
22 const position = editor.selection.active; 22 const position = editor.selection.active;
23 const request: MacroExpandParams = { 23 const request: MacroExpandParams = {
24 textDocument: { uri: editor.document.uri.toString() }, 24 textDocument: { uri: editor.document.uri.toString() },
25 position 25 position,
26 }; 26 };
27 const expanded = await Server.client.sendRequest<ExpandedMacro>( 27 const expanded = await Server.client.sendRequest<ExpandedMacro>(
28 'rust-analyzer/expandMacro', 28 'rust-analyzer/expandMacro',
29 request 29 request,
30 ); 30 );
31 31
32 if (expanded == null) { 32 if (expanded == null) {
@@ -58,7 +58,7 @@ export function createHandle(provider: ExpandMacroContentProvider) {
58 return vscode.window.showTextDocument( 58 return vscode.window.showTextDocument(
59 document, 59 document,
60 vscode.ViewColumn.Two, 60 vscode.ViewColumn.Two,
61 true 61 true,
62 ); 62 );
63 }; 63 };
64} 64}
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index 2ade6d331..13a696758 100644
--- a/editors/code/src/commands/index.ts
+++ b/editors/code/src/commands/index.ts
@@ -19,5 +19,5 @@ export {
19 runnables, 19 runnables,
20 syntaxTree, 20 syntaxTree,
21 onEnter, 21 onEnter,
22 inlayHints 22 inlayHints,
23}; 23};
diff --git a/editors/code/src/commands/inlay_hints.ts b/editors/code/src/commands/inlay_hints.ts
index 0dbdd94fb..ac7dcce60 100644
--- a/editors/code/src/commands/inlay_hints.ts
+++ b/editors/code/src/commands/inlay_hints.ts
@@ -15,8 +15,8 @@ interface InlayHint {
15 15
16const typeHintDecorationType = vscode.window.createTextEditorDecorationType({ 16const typeHintDecorationType = vscode.window.createTextEditorDecorationType({
17 after: { 17 after: {
18 color: new vscode.ThemeColor('ralsp.inlayHint') 18 color: new vscode.ThemeColor('ralsp.inlayHint'),
19 } 19 },
20}); 20});
21 21
22export class HintsUpdater { 22export class HintsUpdater {
@@ -26,13 +26,13 @@ export class HintsUpdater {
26 if (this.displayHints !== displayHints) { 26 if (this.displayHints !== displayHints) {
27 this.displayHints = displayHints; 27 this.displayHints = displayHints;
28 return this.refreshVisibleEditorsHints( 28 return this.refreshVisibleEditorsHints(
29 displayHints ? undefined : [] 29 displayHints ? undefined : [],
30 ); 30 );
31 } 31 }
32 } 32 }
33 33
34 public async refreshHintsForVisibleEditors( 34 public async refreshHintsForVisibleEditors(
35 cause?: TextDocumentChangeEvent 35 cause?: TextDocumentChangeEvent,
36 ): Promise<void> { 36 ): Promise<void> {
37 if (!this.displayHints) { 37 if (!this.displayHints) {
38 return; 38 return;
@@ -48,21 +48,21 @@ export class HintsUpdater {
48 } 48 }
49 49
50 private async refreshVisibleEditorsHints( 50 private async refreshVisibleEditorsHints(
51 newDecorations?: vscode.DecorationOptions[] 51 newDecorations?: vscode.DecorationOptions[],
52 ) { 52 ) {
53 const promises: Array<Promise<void>> = []; 53 const promises: Array<Promise<void>> = [];
54 54
55 for (const rustEditor of vscode.window.visibleTextEditors.filter( 55 for (const rustEditor of vscode.window.visibleTextEditors.filter(
56 editor => this.isRustDocument(editor.document) 56 editor => this.isRustDocument(editor.document),
57 )) { 57 )) {
58 if (newDecorations !== undefined) { 58 if (newDecorations !== undefined) {
59 promises.push( 59 promises.push(
60 Promise.resolve( 60 Promise.resolve(
61 rustEditor.setDecorations( 61 rustEditor.setDecorations(
62 typeHintDecorationType, 62 typeHintDecorationType,
63 newDecorations 63 newDecorations,
64 ) 64 ),
65 ) 65 ),
66 ); 66 );
67 } else { 67 } else {
68 promises.push(this.updateDecorationsFromServer(rustEditor)); 68 promises.push(this.updateDecorationsFromServer(rustEditor));
@@ -79,7 +79,7 @@ export class HintsUpdater {
79 } 79 }
80 80
81 private async updateDecorationsFromServer( 81 private async updateDecorationsFromServer(
82 editor: TextEditor 82 editor: TextEditor,
83 ): Promise<void> { 83 ): Promise<void> {
84 const newHints = await this.queryHints(editor.document.uri.toString()); 84 const newHints = await this.queryHints(editor.document.uri.toString());
85 if (newHints !== null) { 85 if (newHints !== null) {
@@ -87,20 +87,20 @@ export class HintsUpdater {
87 range: hint.range, 87 range: hint.range,
88 renderOptions: { 88 renderOptions: {
89 after: { 89 after: {
90 contentText: `: ${hint.label}` 90 contentText: `: ${hint.label}`,
91 } 91 },
92 } 92 },
93 })); 93 }));
94 return editor.setDecorations( 94 return editor.setDecorations(
95 typeHintDecorationType, 95 typeHintDecorationType,
96 newDecorations 96 newDecorations,
97 ); 97 );
98 } 98 }
99 } 99 }
100 100
101 private async queryHints(documentUri: string): Promise<InlayHint[] | null> { 101 private async queryHints(documentUri: string): Promise<InlayHint[] | null> {
102 const request: InlayHintsParams = { 102 const request: InlayHintsParams = {
103 textDocument: { uri: documentUri } 103 textDocument: { uri: documentUri },
104 }; 104 };
105 const client = Server.client; 105 const client = Server.client;
106 return client 106 return client
@@ -108,8 +108,8 @@ export class HintsUpdater {
108 .then(() => 108 .then(() =>
109 client.sendRequest<InlayHint[] | null>( 109 client.sendRequest<InlayHint[] | null>(
110 'rust-analyzer/inlayHints', 110 'rust-analyzer/inlayHints',
111 request 111 request,
112 ) 112 ),
113 ); 113 );
114 } 114 }
115} 115}
diff --git a/editors/code/src/commands/join_lines.ts b/editors/code/src/commands/join_lines.ts
index 0d4b12f4d..134ddc801 100644
--- a/editors/code/src/commands/join_lines.ts
+++ b/editors/code/src/commands/join_lines.ts
@@ -4,7 +4,7 @@ import { Range, TextDocumentIdentifier } from 'vscode-languageclient';
4import { Server } from '../server'; 4import { Server } from '../server';
5import { 5import {
6 handle as applySourceChange, 6 handle as applySourceChange,
7 SourceChange 7 SourceChange,
8} from './apply_source_change'; 8} from './apply_source_change';
9 9
10interface JoinLinesParams { 10interface JoinLinesParams {
@@ -19,11 +19,11 @@ export async function handle() {
19 } 19 }
20 const request: JoinLinesParams = { 20 const request: JoinLinesParams = {
21 range: Server.client.code2ProtocolConverter.asRange(editor.selection), 21 range: Server.client.code2ProtocolConverter.asRange(editor.selection),
22 textDocument: { uri: editor.document.uri.toString() } 22 textDocument: { uri: editor.document.uri.toString() },
23 }; 23 };
24 const change = await Server.client.sendRequest<SourceChange>( 24 const change = await Server.client.sendRequest<SourceChange>(
25 'rust-analyzer/joinLines', 25 'rust-analyzer/joinLines',
26 request 26 request,
27 ); 27 );
28 await applySourceChange(change); 28 await applySourceChange(change);
29} 29}
diff --git a/editors/code/src/commands/matching_brace.ts b/editors/code/src/commands/matching_brace.ts
index d86faf405..364208cc7 100644
--- a/editors/code/src/commands/matching_brace.ts
+++ b/editors/code/src/commands/matching_brace.ts
@@ -17,15 +17,15 @@ export async function handle() {
17 textDocument: { uri: editor.document.uri.toString() }, 17 textDocument: { uri: editor.document.uri.toString() },
18 offsets: editor.selections.map(s => { 18 offsets: editor.selections.map(s => {
19 return Server.client.code2ProtocolConverter.asPosition(s.active); 19 return Server.client.code2ProtocolConverter.asPosition(s.active);
20 }) 20 }),
21 }; 21 };
22 const response = await Server.client.sendRequest<Position[]>( 22 const response = await Server.client.sendRequest<Position[]>(
23 'rust-analyzer/findMatchingBrace', 23 'rust-analyzer/findMatchingBrace',
24 request 24 request,
25 ); 25 );
26 editor.selections = editor.selections.map((sel, idx) => { 26 editor.selections = editor.selections.map((sel, idx) => {
27 const active = Server.client.protocol2CodeConverter.asPosition( 27 const active = Server.client.protocol2CodeConverter.asPosition(
28 response[idx] 28 response[idx],
29 ); 29 );
30 const anchor = sel.isEmpty ? active : sel.anchor; 30 const anchor = sel.isEmpty ? active : sel.anchor;
31 return new vscode.Selection(anchor, active); 31 return new vscode.Selection(anchor, active);
diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts
index 16dcb70c8..772c64b3c 100644
--- a/editors/code/src/commands/on_enter.ts
+++ b/editors/code/src/commands/on_enter.ts
@@ -3,7 +3,7 @@ import * as lc from 'vscode-languageclient';
3import { Server } from '../server'; 3import { Server } from '../server';
4import { 4import {
5 handle as applySourceChange, 5 handle as applySourceChange,
6 SourceChange 6 SourceChange,
7} from './apply_source_change'; 7} from './apply_source_change';
8 8
9export async function handle(event: { text: string }): Promise<boolean> { 9export async function handle(event: { text: string }): Promise<boolean> {
@@ -18,12 +18,12 @@ export async function handle(event: { text: string }): Promise<boolean> {
18 const request: lc.TextDocumentPositionParams = { 18 const request: lc.TextDocumentPositionParams = {
19 textDocument: { uri: editor.document.uri.toString() }, 19 textDocument: { uri: editor.document.uri.toString() },
20 position: Server.client.code2ProtocolConverter.asPosition( 20 position: Server.client.code2ProtocolConverter.asPosition(
21 editor.selection.active 21 editor.selection.active,
22 ) 22 ),
23 }; 23 };
24 const change = await Server.client.sendRequest<undefined | SourceChange>( 24 const change = await Server.client.sendRequest<undefined | SourceChange>(
25 'rust-analyzer/onEnter', 25 'rust-analyzer/onEnter',
26 request 26 request,
27 ); 27 );
28 if (!change) { 28 if (!change) {
29 return false; 29 return false;
diff --git a/editors/code/src/commands/parent_module.ts b/editors/code/src/commands/parent_module.ts
index 9d30b7b59..ad49e1bdb 100644
--- a/editors/code/src/commands/parent_module.ts
+++ b/editors/code/src/commands/parent_module.ts
@@ -11,12 +11,12 @@ export async function handle() {
11 const request: lc.TextDocumentPositionParams = { 11 const request: lc.TextDocumentPositionParams = {
12 textDocument: { uri: editor.document.uri.toString() }, 12 textDocument: { uri: editor.document.uri.toString() },
13 position: Server.client.code2ProtocolConverter.asPosition( 13 position: Server.client.code2ProtocolConverter.asPosition(
14 editor.selection.active 14 editor.selection.active,
15 ) 15 ),
16 }; 16 };
17 const response = await Server.client.sendRequest<lc.Location[]>( 17 const response = await Server.client.sendRequest<lc.Location[]>(
18 'rust-analyzer/parentModule', 18 'rust-analyzer/parentModule',
19 request 19 request,
20 ); 20 );
21 const loc = response[0]; 21 const loc = response[0];
22 if (loc == null) { 22 if (loc == null) {
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index ac59bf60d..cf980e257 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -46,17 +46,17 @@ function createTask(spec: Runnable): vscode.Task {
46 label: spec.label, 46 label: spec.label,
47 command: spec.bin, 47 command: spec.bin,
48 args: spec.args, 48 args: spec.args,
49 env: spec.env 49 env: spec.env,
50 }; 50 };
51 51
52 const execOption: vscode.ShellExecutionOptions = { 52 const execOption: vscode.ShellExecutionOptions = {
53 cwd: spec.cwd || '.', 53 cwd: spec.cwd || '.',
54 env: definition.env 54 env: definition.env,
55 }; 55 };
56 const exec = new vscode.ShellExecution( 56 const exec = new vscode.ShellExecution(
57 definition.command, 57 definition.command,
58 definition.args, 58 definition.args,
59 execOption 59 execOption,
60 ); 60 );
61 61
62 const f = vscode.workspace.workspaceFolders![0]; 62 const f = vscode.workspace.workspaceFolders![0];
@@ -66,30 +66,30 @@ function createTask(spec: Runnable): vscode.Task {
66 definition.label, 66 definition.label,
67 TASK_SOURCE, 67 TASK_SOURCE,
68 exec, 68 exec,
69 ['$rustc'] 69 ['$rustc'],
70 ); 70 );
71 t.presentationOptions.clear = true; 71 t.presentationOptions.clear = true;
72 return t; 72 return t;
73} 73}
74 74
75let prevRunnable: RunnableQuickPick | undefined; 75let prevRunnable: RunnableQuickPick | undefined;
76export async function handle() { 76export async function handle(): Promise<vscode.TaskExecution | undefined> {
77 const editor = vscode.window.activeTextEditor; 77 const editor = vscode.window.activeTextEditor;
78 if (editor == null || editor.document.languageId !== 'rust') { 78 if (editor == null || editor.document.languageId !== 'rust') {
79 return; 79 return;
80 } 80 }
81 const textDocument: lc.TextDocumentIdentifier = { 81 const textDocument: lc.TextDocumentIdentifier = {
82 uri: editor.document.uri.toString() 82 uri: editor.document.uri.toString(),
83 }; 83 };
84 const params: RunnablesParams = { 84 const params: RunnablesParams = {
85 textDocument, 85 textDocument,
86 position: Server.client.code2ProtocolConverter.asPosition( 86 position: Server.client.code2ProtocolConverter.asPosition(
87 editor.selection.active 87 editor.selection.active,
88 ) 88 ),
89 }; 89 };
90 const runnables = await Server.client.sendRequest<Runnable[]>( 90 const runnables = await Server.client.sendRequest<Runnable[]>(
91 'rust-analyzer/runnables', 91 'rust-analyzer/runnables',
92 params 92 params,
93 ); 93 );
94 const items: RunnableQuickPick[] = []; 94 const items: RunnableQuickPick[] = [];
95 if (prevRunnable) { 95 if (prevRunnable) {
@@ -105,12 +105,14 @@ export async function handle() {
105 items.push(new RunnableQuickPick(r)); 105 items.push(new RunnableQuickPick(r));
106 } 106 }
107 const item = await vscode.window.showQuickPick(items); 107 const item = await vscode.window.showQuickPick(items);
108 if (item) { 108 if (!item) {
109 item.detail = 'rerun'; 109 return;
110 prevRunnable = item;
111 const task = createTask(item.runnable);
112 return await vscode.tasks.executeTask(task);
113 } 110 }
111
112 item.detail = 'rerun';
113 prevRunnable = item;
114 const task = createTask(item.runnable);
115 return await vscode.tasks.executeTask(task);
114} 116}
115 117
116export async function handleSingle(runnable: Runnable) { 118export async function handleSingle(runnable: Runnable) {
@@ -124,7 +126,7 @@ export async function handleSingle(runnable: Runnable) {
124 task.presentationOptions = { 126 task.presentationOptions = {
125 reveal: vscode.TaskRevealKind.Always, 127 reveal: vscode.TaskRevealKind.Always,
126 panel: vscode.TaskPanelKind.Dedicated, 128 panel: vscode.TaskPanelKind.Dedicated,
127 clear: true 129 clear: true,
128 }; 130 };
129 131
130 return vscode.tasks.executeTask(task); 132 return vscode.tasks.executeTask(task);
@@ -136,7 +138,7 @@ export async function handleSingle(runnable: Runnable) {
136 * that, when accepted, allow us to `cargo install cargo-watch` and then run it. 138 * that, when accepted, allow us to `cargo install cargo-watch` and then run it.
137 */ 139 */
138export async function interactivelyStartCargoWatch( 140export async function interactivelyStartCargoWatch(
139 context: vscode.ExtensionContext 141 context: vscode.ExtensionContext,
140): Promise<CargoWatchProvider | undefined> { 142): Promise<CargoWatchProvider | undefined> {
141 if (Server.config.cargoWatchOptions.enableOnStartup === 'disabled') { 143 if (Server.config.cargoWatchOptions.enableOnStartup === 'disabled') {
142 return; 144 return;
@@ -146,7 +148,7 @@ export async function interactivelyStartCargoWatch(
146 const watch = await vscode.window.showInformationMessage( 148 const watch = await vscode.window.showInformationMessage(
147 'Start watching changes with cargo? (Executes `cargo watch`, provides inline diagnostics)', 149 'Start watching changes with cargo? (Executes `cargo watch`, provides inline diagnostics)',
148 'yes', 150 'yes',
149 'no' 151 'no',
150 ); 152 );
151 if (watch !== 'yes') { 153 if (watch !== 'yes') {
152 return; 154 return;
@@ -157,12 +159,12 @@ export async function interactivelyStartCargoWatch(
157} 159}
158 160
159export async function startCargoWatch( 161export async function startCargoWatch(
160 context: vscode.ExtensionContext 162 context: vscode.ExtensionContext,
161): Promise<CargoWatchProvider | undefined> { 163): Promise<CargoWatchProvider | undefined> {
162 const execPromise = util.promisify(child_process.exec); 164 const execPromise = util.promisify(child_process.exec);
163 165
164 const { stderr, code = 0 } = await execPromise( 166 const { stderr, code = 0 } = await execPromise(
165 'cargo watch --version' 167 'cargo watch --version',
166 ).catch(e => e); 168 ).catch(e => e);
167 169
168 if (stderr.includes('no such subcommand: `watch`')) { 170 if (stderr.includes('no such subcommand: `watch`')) {
@@ -171,14 +173,14 @@ export async function startCargoWatch(
171 const install = await vscode.window.showInformationMessage( 173 const install = await vscode.window.showInformationMessage(
172 msg, 174 msg,
173 'yes', 175 'yes',
174 'no' 176 'no',
175 ); 177 );
176 if (install !== 'yes') { 178 if (install !== 'yes') {
177 return; 179 return;
178 } 180 }
179 181
180 const label = 'install-cargo-watch'; 182 const label = 'install-cargo-watch';
181 const taskFinished = new Promise((resolve, reject) => { 183 const taskFinished = new Promise((resolve, _reject) => {
182 const disposable = vscode.tasks.onDidEndTask(({ execution }) => { 184 const disposable = vscode.tasks.onDidEndTask(({ execution }) => {
183 if (execution.task.name === label) { 185 if (execution.task.name === label) {
184 disposable.dispose(); 186 disposable.dispose();
@@ -192,20 +194,20 @@ export async function startCargoWatch(
192 label, 194 label,
193 bin: 'cargo', 195 bin: 'cargo',
194 args: ['install', 'cargo-watch'], 196 args: ['install', 'cargo-watch'],
195 env: {} 197 env: {},
196 }) 198 }),
197 ); 199 );
198 await taskFinished; 200 await taskFinished;
199 const output = await execPromise('cargo watch --version').catch(e => e); 201 const output = await execPromise('cargo watch --version').catch(e => e);
200 if (output.stderr !== '') { 202 if (output.stderr !== '') {
201 vscode.window.showErrorMessage( 203 vscode.window.showErrorMessage(
202 `Couldn't install \`cargo-\`watch: ${output.stderr}` 204 `Couldn't install \`cargo-\`watch: ${output.stderr}`,
203 ); 205 );
204 return; 206 return;
205 } 207 }
206 } else if (code !== 0) { 208 } else if (code !== 0) {
207 vscode.window.showErrorMessage( 209 vscode.window.showErrorMessage(
208 `\`cargo watch\` failed with ${code}: ${stderr}` 210 `\`cargo watch\` failed with ${code}: ${stderr}`,
209 ); 211 );
210 return; 212 return;
211 } 213 }
diff --git a/editors/code/src/commands/syntaxTree.ts b/editors/code/src/commands/syntaxTree.ts
index 2f50fe14b..89a80550c 100644
--- a/editors/code/src/commands/syntaxTree.ts
+++ b/editors/code/src/commands/syntaxTree.ts
@@ -11,7 +11,7 @@ export class SyntaxTreeContentProvider
11 public syntaxTree: string = 'Not available'; 11 public syntaxTree: string = 'Not available';
12 12
13 public provideTextDocumentContent( 13 public provideTextDocumentContent(
14 uri: vscode.Uri 14 uri: vscode.Uri,
15 ): vscode.ProviderResult<string> { 15 ): vscode.ProviderResult<string> {
16 const editor = vscode.window.activeTextEditor; 16 const editor = vscode.window.activeTextEditor;
17 if (editor == null) { 17 if (editor == null) {
@@ -25,17 +25,17 @@ export class SyntaxTreeContentProvider
25 range = editor.selection.isEmpty 25 range = editor.selection.isEmpty
26 ? undefined 26 ? undefined
27 : Server.client.code2ProtocolConverter.asRange( 27 : Server.client.code2ProtocolConverter.asRange(
28 editor.selection 28 editor.selection,
29 ); 29 );
30 } 30 }
31 31
32 const request: SyntaxTreeParams = { 32 const request: SyntaxTreeParams = {
33 textDocument: { uri: editor.document.uri.toString() }, 33 textDocument: { uri: editor.document.uri.toString() },
34 range 34 range,
35 }; 35 };
36 return Server.client.sendRequest<SyntaxTreeResult>( 36 return Server.client.sendRequest<SyntaxTreeResult>(
37 'rust-analyzer/syntaxTree', 37 'rust-analyzer/syntaxTree',
38 request 38 request,
39 ); 39 );
40 } 40 }
41 41
@@ -70,7 +70,7 @@ export function createHandle(provider: SyntaxTreeContentProvider) {
70 return vscode.window.showTextDocument( 70 return vscode.window.showTextDocument(
71 document, 71 document,
72 vscode.ViewColumn.Two, 72 vscode.ViewColumn.Two,
73 true 73 true,
74 ); 74 );
75 }; 75 };
76} 76}
diff --git a/editors/code/src/commands/watch_status.ts b/editors/code/src/commands/watch_status.ts
index 6c1f9041b..8d64394c7 100644
--- a/editors/code/src/commands/watch_status.ts
+++ b/editors/code/src/commands/watch_status.ts
@@ -13,7 +13,7 @@ export class StatusDisplay implements vscode.Disposable {
13 constructor(command: string) { 13 constructor(command: string) {
14 this.statusBarItem = vscode.window.createStatusBarItem( 14 this.statusBarItem = vscode.window.createStatusBarItem(
15 vscode.StatusBarAlignment.Left, 15 vscode.StatusBarAlignment.Left,
16 10 16 10,
17 ); 17 );
18 this.command = command; 18 this.command = command;
19 this.statusBarItem.hide(); 19 this.statusBarItem.hide();
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 4cedbea46..c06dddb1c 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -14,6 +14,13 @@ export interface CargoWatchOptions {
14 command: string; 14 command: string;
15 trace: CargoWatchTraceOptions; 15 trace: CargoWatchTraceOptions;
16 ignore: string[]; 16 ignore: string[];
17 allTargets: boolean;
18}
19
20export interface CargoFeatures {
21 noDefaultFeatures: boolean;
22 allFeatures: boolean;
23 features: string[];
17} 24}
18 25
19export class Config { 26export class Config {
@@ -25,21 +32,30 @@ export class Config {
25 public displayInlayHints = true; 32 public displayInlayHints = true;
26 public maxInlayHintLength: null | number = null; 33 public maxInlayHintLength: null | number = null;
27 public excludeGlobs = []; 34 public excludeGlobs = [];
28 public useClientWatching = false; 35 public useClientWatching = true;
29 public featureFlags = {}; 36 public featureFlags = {};
37 // for internal use
38 public withSysroot: null | boolean = null;
30 public cargoWatchOptions: CargoWatchOptions = { 39 public cargoWatchOptions: CargoWatchOptions = {
31 enableOnStartup: 'ask', 40 enableOnStartup: 'ask',
32 trace: 'off', 41 trace: 'off',
33 arguments: '', 42 arguments: '',
34 command: '', 43 command: '',
35 ignore: [] 44 ignore: [],
45 allTargets: true,
46 };
47 public cargoFeatures: CargoFeatures = {
48 noDefaultFeatures: false,
49 allFeatures: true,
50 features: [],
36 }; 51 };
37 52
38 private prevEnhancedTyping: null | boolean = null; 53 private prevEnhancedTyping: null | boolean = null;
54 private prevCargoFeatures: null | CargoFeatures = null;
39 55
40 constructor() { 56 constructor() {
41 vscode.workspace.onDidChangeConfiguration(_ => 57 vscode.workspace.onDidChangeConfiguration(_ =>
42 this.userConfigChanged() 58 this.userConfigChanged(),
43 ); 59 );
44 this.userConfigChanged(); 60 this.userConfigChanged();
45 } 61 }
@@ -49,6 +65,8 @@ export class Config {
49 65
50 Server.highlighter.removeHighlights(); 66 Server.highlighter.removeHighlights();
51 67
68 let requireReloadMessage = null;
69
52 if (config.has('highlightingOn')) { 70 if (config.has('highlightingOn')) {
53 this.highlightingOn = config.get('highlightingOn') as boolean; 71 this.highlightingOn = config.get('highlightingOn') as boolean;
54 if (this.highlightingOn) { 72 if (this.highlightingOn) {
@@ -59,13 +77,13 @@ export class Config {
59 77
60 if (config.has('rainbowHighlightingOn')) { 78 if (config.has('rainbowHighlightingOn')) {
61 this.rainbowHighlightingOn = config.get( 79 this.rainbowHighlightingOn = config.get(
62 'rainbowHighlightingOn' 80 'rainbowHighlightingOn',
63 ) as boolean; 81 ) as boolean;
64 } 82 }
65 83
66 if (config.has('enableEnhancedTyping')) { 84 if (config.has('enableEnhancedTyping')) {
67 this.enableEnhancedTyping = config.get( 85 this.enableEnhancedTyping = config.get(
68 'enableEnhancedTyping' 86 'enableEnhancedTyping',
69 ) as boolean; 87 ) as boolean;
70 88
71 if (this.prevEnhancedTyping === null) { 89 if (this.prevEnhancedTyping === null) {
@@ -76,19 +94,8 @@ export class Config {
76 } 94 }
77 95
78 if (this.prevEnhancedTyping !== this.enableEnhancedTyping) { 96 if (this.prevEnhancedTyping !== this.enableEnhancedTyping) {
79 const reloadAction = 'Reload now'; 97 requireReloadMessage =
80 vscode.window 98 'Changing enhanced typing setting requires a reload';
81 .showInformationMessage(
82 'Changing enhanced typing setting requires a reload',
83 reloadAction
84 )
85 .then(selectedAction => {
86 if (selectedAction === reloadAction) {
87 vscode.commands.executeCommand(
88 'workbench.action.reloadWindow'
89 );
90 }
91 });
92 this.prevEnhancedTyping = this.enableEnhancedTyping; 99 this.prevEnhancedTyping = this.enableEnhancedTyping;
93 } 100 }
94 101
@@ -106,28 +113,35 @@ export class Config {
106 if (config.has('trace.cargo-watch')) { 113 if (config.has('trace.cargo-watch')) {
107 this.cargoWatchOptions.trace = config.get<CargoWatchTraceOptions>( 114 this.cargoWatchOptions.trace = config.get<CargoWatchTraceOptions>(
108 'trace.cargo-watch', 115 'trace.cargo-watch',
109 'off' 116 'off',
110 ); 117 );
111 } 118 }
112 119
113 if (config.has('cargo-watch.arguments')) { 120 if (config.has('cargo-watch.arguments')) {
114 this.cargoWatchOptions.arguments = config.get<string>( 121 this.cargoWatchOptions.arguments = config.get<string>(
115 'cargo-watch.arguments', 122 'cargo-watch.arguments',
116 '' 123 '',
117 ); 124 );
118 } 125 }
119 126
120 if (config.has('cargo-watch.command')) { 127 if (config.has('cargo-watch.command')) {
121 this.cargoWatchOptions.command = config.get<string>( 128 this.cargoWatchOptions.command = config.get<string>(
122 'cargo-watch.command', 129 'cargo-watch.command',
123 '' 130 '',
124 ); 131 );
125 } 132 }
126 133
127 if (config.has('cargo-watch.ignore')) { 134 if (config.has('cargo-watch.ignore')) {
128 this.cargoWatchOptions.ignore = config.get<string[]>( 135 this.cargoWatchOptions.ignore = config.get<string[]>(
129 'cargo-watch.ignore', 136 'cargo-watch.ignore',
130 [] 137 [],
138 );
139 }
140
141 if (config.has('cargo-watch.allTargets')) {
142 this.cargoWatchOptions.allTargets = config.get<boolean>(
143 'cargo-watch.allTargets',
144 true,
131 ); 145 );
132 } 146 }
133 147
@@ -140,17 +154,68 @@ export class Config {
140 } 154 }
141 if (config.has('maxInlayHintLength')) { 155 if (config.has('maxInlayHintLength')) {
142 this.maxInlayHintLength = config.get( 156 this.maxInlayHintLength = config.get(
143 'maxInlayHintLength' 157 'maxInlayHintLength',
144 ) as number; 158 ) as number;
145 } 159 }
146 if (config.has('excludeGlobs')) { 160 if (config.has('excludeGlobs')) {
147 this.excludeGlobs = config.get('excludeGlobs') || []; 161 this.excludeGlobs = config.get('excludeGlobs') || [];
148 } 162 }
149 if (config.has('useClientWatching')) { 163 if (config.has('useClientWatching')) {
150 this.useClientWatching = config.get('useClientWatching') || false; 164 this.useClientWatching = config.get('useClientWatching') || true;
151 } 165 }
152 if (config.has('featureFlags')) { 166 if (config.has('featureFlags')) {
153 this.featureFlags = config.get('featureFlags') || {}; 167 this.featureFlags = config.get('featureFlags') || {};
154 } 168 }
169 if (config.has('withSysroot')) {
170 this.withSysroot = config.get('withSysroot') || false;
171 }
172
173 if (config.has('cargoFeatures.noDefaultFeatures')) {
174 this.cargoFeatures.noDefaultFeatures = config.get(
175 'cargoFeatures.noDefaultFeatures',
176 false,
177 );
178 }
179 if (config.has('cargoFeatures.allFeatures')) {
180 this.cargoFeatures.allFeatures = config.get(
181 'cargoFeatures.allFeatures',
182 true,
183 );
184 }
185 if (config.has('cargoFeatures.features')) {
186 this.cargoFeatures.features = config.get(
187 'cargoFeatures.features',
188 [],
189 );
190 }
191
192 if (
193 this.prevCargoFeatures !== null &&
194 (this.cargoFeatures.allFeatures !==
195 this.prevCargoFeatures.allFeatures ||
196 this.cargoFeatures.noDefaultFeatures !==
197 this.prevCargoFeatures.noDefaultFeatures ||
198 this.cargoFeatures.features.length !==
199 this.prevCargoFeatures.features.length ||
200 this.cargoFeatures.features.some(
201 (v, i) => v !== this.prevCargoFeatures!.features[i],
202 ))
203 ) {
204 requireReloadMessage = 'Changing cargo features requires a reload';
205 }
206 this.prevCargoFeatures = { ...this.cargoFeatures };
207
208 if (requireReloadMessage !== null) {
209 const reloadAction = 'Reload now';
210 vscode.window
211 .showInformationMessage(requireReloadMessage, reloadAction)
212 .then(selectedAction => {
213 if (selectedAction === reloadAction) {
214 vscode.commands.executeCommand(
215 'workbench.action.reloadWindow',
216 );
217 }
218 });
219 }
155 } 220 }
156} 221}
diff --git a/editors/code/src/events/change_active_text_editor.ts b/editors/code/src/events/change_active_text_editor.ts
index 64be56225..74b91bd48 100644
--- a/editors/code/src/events/change_active_text_editor.ts
+++ b/editors/code/src/events/change_active_text_editor.ts
@@ -3,7 +3,7 @@ import { TextDocumentIdentifier } from 'vscode-languageclient';
3 3
4import { 4import {
5 SyntaxTreeContentProvider, 5 SyntaxTreeContentProvider,
6 syntaxTreeUri 6 syntaxTreeUri,
7} from '../commands/syntaxTree'; 7} from '../commands/syntaxTree';
8import { Decoration } from '../highlighting'; 8import { Decoration } from '../highlighting';
9import { Server } from '../server'; 9import { Server } from '../server';
@@ -21,11 +21,11 @@ export function makeHandler(syntaxTreeProvider: SyntaxTreeContentProvider) {
21 } 21 }
22 22
23 const params: TextDocumentIdentifier = { 23 const params: TextDocumentIdentifier = {
24 uri: editor.document.uri.toString() 24 uri: editor.document.uri.toString(),
25 }; 25 };
26 const decorations = await Server.client.sendRequest<Decoration[]>( 26 const decorations = await Server.client.sendRequest<Decoration[]>(
27 'rust-analyzer/decorationsRequest', 27 'rust-analyzer/decorationsRequest',
28 params 28 params,
29 ); 29 );
30 Server.highlighter.setHighlights(editor, decorations); 30 Server.highlighter.setHighlights(editor, decorations);
31 }; 31 };
diff --git a/editors/code/src/events/change_text_document.ts b/editors/code/src/events/change_text_document.ts
index 89488bc61..2e998e889 100644
--- a/editors/code/src/events/change_text_document.ts
+++ b/editors/code/src/events/change_text_document.ts
@@ -2,7 +2,7 @@ import * as vscode from 'vscode';
2 2
3import { 3import {
4 SyntaxTreeContentProvider, 4 SyntaxTreeContentProvider,
5 syntaxTreeUri 5 syntaxTreeUri,
6} from '../commands/syntaxTree'; 6} from '../commands/syntaxTree';
7 7
8export function createHandler(syntaxTreeProvider: SyntaxTreeContentProvider) { 8export function createHandler(syntaxTreeProvider: SyntaxTreeContentProvider) {
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts
index 683497dfd..815f3692c 100644
--- a/editors/code/src/extension.ts
+++ b/editors/code/src/extension.ts
@@ -7,14 +7,14 @@ import { ExpandMacroContentProvider } from './commands/expand_macro';
7import { HintsUpdater } from './commands/inlay_hints'; 7import { HintsUpdater } from './commands/inlay_hints';
8import { 8import {
9 interactivelyStartCargoWatch, 9 interactivelyStartCargoWatch,
10 startCargoWatch 10 startCargoWatch,
11} from './commands/runnables'; 11} from './commands/runnables';
12import { SyntaxTreeContentProvider } from './commands/syntaxTree'; 12import { SyntaxTreeContentProvider } from './commands/syntaxTree';
13import * as events from './events'; 13import * as events from './events';
14import * as notifications from './notifications'; 14import * as notifications from './notifications';
15import { Server } from './server'; 15import { Server } from './server';
16 16
17export function activate(context: vscode.ExtensionContext) { 17export async function activate(context: vscode.ExtensionContext) {
18 function disposeOnDeactivation(disposable: vscode.Disposable) { 18 function disposeOnDeactivation(disposable: vscode.Disposable) {
19 context.subscriptions.push(disposable); 19 context.subscriptions.push(disposable);
20 } 20 }
@@ -24,7 +24,7 @@ export function activate(context: vscode.ExtensionContext) {
24 } 24 }
25 function overrideCommand( 25 function overrideCommand(
26 name: string, 26 name: string,
27 f: (...args: any[]) => Promise<boolean> 27 f: (...args: any[]) => Promise<boolean>,
28 ) { 28 ) {
29 const defaultCmd = `default:${name}`; 29 const defaultCmd = `default:${name}`;
30 const original = (...args: any[]) => 30 const original = (...args: any[]) =>
@@ -46,7 +46,7 @@ export function activate(context: vscode.ExtensionContext) {
46 }); 46 });
47 } catch (_) { 47 } catch (_) {
48 vscode.window.showWarningMessage( 48 vscode.window.showWarningMessage(
49 'Enhanced typing feature is disabled because of incompatibility with VIM extension, consider turning off rust-analyzer.enableEnhancedTyping: https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/README.md#settings' 49 'Enhanced typing feature is disabled because of incompatibility with VIM extension, consider turning off rust-analyzer.enableEnhancedTyping: https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/README.md#settings',
50 ); 50 );
51 } 51 }
52 } 52 }
@@ -54,14 +54,14 @@ export function activate(context: vscode.ExtensionContext) {
54 // Commands are requests from vscode to the language server 54 // Commands are requests from vscode to the language server
55 registerCommand( 55 registerCommand(
56 'rust-analyzer.analyzerStatus', 56 'rust-analyzer.analyzerStatus',
57 commands.analyzerStatus.makeCommand(context) 57 commands.analyzerStatus.makeCommand(context),
58 ); 58 );
59 registerCommand('rust-analyzer.collectGarbage', () => 59 registerCommand('rust-analyzer.collectGarbage', () =>
60 Server.client.sendRequest<null>('rust-analyzer/collectGarbage', null) 60 Server.client.sendRequest<null>('rust-analyzer/collectGarbage', null),
61 ); 61 );
62 registerCommand( 62 registerCommand(
63 'rust-analyzer.matchingBrace', 63 'rust-analyzer.matchingBrace',
64 commands.matchingBrace.handle 64 commands.matchingBrace.handle,
65 ); 65 );
66 registerCommand('rust-analyzer.joinLines', commands.joinLines.handle); 66 registerCommand('rust-analyzer.joinLines', commands.joinLines.handle);
67 registerCommand('rust-analyzer.parentModule', commands.parentModule.handle); 67 registerCommand('rust-analyzer.parentModule', commands.parentModule.handle);
@@ -70,7 +70,7 @@ export function activate(context: vscode.ExtensionContext) {
70 registerCommand('rust-analyzer.runSingle', commands.runnables.handleSingle); 70 registerCommand('rust-analyzer.runSingle', commands.runnables.handleSingle);
71 registerCommand( 71 registerCommand(
72 'rust-analyzer.applySourceChange', 72 'rust-analyzer.applySourceChange',
73 commands.applySourceChange.handle 73 commands.applySourceChange.handle,
74 ); 74 );
75 registerCommand( 75 registerCommand(
76 'rust-analyzer.showReferences', 76 'rust-analyzer.showReferences',
@@ -79,9 +79,9 @@ export function activate(context: vscode.ExtensionContext) {
79 'editor.action.showReferences', 79 'editor.action.showReferences',
80 vscode.Uri.parse(uri), 80 vscode.Uri.parse(uri),
81 Server.client.protocol2CodeConverter.asPosition(position), 81 Server.client.protocol2CodeConverter.asPosition(position),
82 locations.map(Server.client.protocol2CodeConverter.asLocation) 82 locations.map(Server.client.protocol2CodeConverter.asLocation),
83 ); 83 );
84 } 84 },
85 ); 85 );
86 86
87 if (Server.config.enableEnhancedTyping) { 87 if (Server.config.enableEnhancedTyping) {
@@ -89,48 +89,49 @@ export function activate(context: vscode.ExtensionContext) {
89 } 89 }
90 90
91 // Notifications are events triggered by the language server 91 // Notifications are events triggered by the language server
92 const allNotifications: Iterable< 92 const allNotifications: Iterable<[
93 [string, lc.GenericNotificationHandler] 93 string,
94 > = [ 94 lc.GenericNotificationHandler,
95 ]> = [
95 [ 96 [
96 'rust-analyzer/publishDecorations', 97 'rust-analyzer/publishDecorations',
97 notifications.publishDecorations.handle 98 notifications.publishDecorations.handle,
98 ] 99 ],
99 ]; 100 ];
100 const syntaxTreeContentProvider = new SyntaxTreeContentProvider(); 101 const syntaxTreeContentProvider = new SyntaxTreeContentProvider();
101 const expandMacroContentProvider = new ExpandMacroContentProvider(); 102 const expandMacroContentProvider = new ExpandMacroContentProvider();
102 103
103 // The events below are plain old javascript events, triggered and handled by vscode 104 // The events below are plain old javascript events, triggered and handled by vscode
104 vscode.window.onDidChangeActiveTextEditor( 105 vscode.window.onDidChangeActiveTextEditor(
105 events.changeActiveTextEditor.makeHandler(syntaxTreeContentProvider) 106 events.changeActiveTextEditor.makeHandler(syntaxTreeContentProvider),
106 ); 107 );
107 108
108 disposeOnDeactivation( 109 disposeOnDeactivation(
109 vscode.workspace.registerTextDocumentContentProvider( 110 vscode.workspace.registerTextDocumentContentProvider(
110 'rust-analyzer', 111 'rust-analyzer',
111 syntaxTreeContentProvider 112 syntaxTreeContentProvider,
112 ) 113 ),
113 ); 114 );
114 disposeOnDeactivation( 115 disposeOnDeactivation(
115 vscode.workspace.registerTextDocumentContentProvider( 116 vscode.workspace.registerTextDocumentContentProvider(
116 'rust-analyzer', 117 'rust-analyzer',
117 expandMacroContentProvider 118 expandMacroContentProvider,
118 ) 119 ),
119 ); 120 );
120 121
121 registerCommand( 122 registerCommand(
122 'rust-analyzer.syntaxTree', 123 'rust-analyzer.syntaxTree',
123 commands.syntaxTree.createHandle(syntaxTreeContentProvider) 124 commands.syntaxTree.createHandle(syntaxTreeContentProvider),
124 ); 125 );
125 registerCommand( 126 registerCommand(
126 'rust-analyzer.expandMacro', 127 'rust-analyzer.expandMacro',
127 commands.expandMacro.createHandle(expandMacroContentProvider) 128 commands.expandMacro.createHandle(expandMacroContentProvider),
128 ); 129 );
129 130
130 vscode.workspace.onDidChangeTextDocument( 131 vscode.workspace.onDidChangeTextDocument(
131 events.changeTextDocument.createHandler(syntaxTreeContentProvider), 132 events.changeTextDocument.createHandler(syntaxTreeContentProvider),
132 null, 133 null,
133 context.subscriptions 134 context.subscriptions,
134 ); 135 );
135 136
136 const startServer = () => Server.start(allNotifications); 137 const startServer = () => Server.start(allNotifications);
@@ -159,7 +160,11 @@ export function activate(context: vscode.ExtensionContext) {
159 }); 160 });
160 161
161 // Start the language server, finally! 162 // Start the language server, finally!
162 startServer(); 163 try {
164 await startServer();
165 } catch (e) {
166 vscode.window.showErrorMessage(e.message);
167 }
163 168
164 if (Server.config.displayInlayHints) { 169 if (Server.config.displayInlayHints) {
165 const hintsUpdater = new HintsUpdater(); 170 const hintsUpdater = new HintsUpdater();
@@ -173,25 +178,25 @@ export function activate(context: vscode.ExtensionContext) {
173 editorChangeDisposable.dispose(); 178 editorChangeDisposable.dispose();
174 } 179 }
175 return hintsUpdater.refreshHintsForVisibleEditors(); 180 return hintsUpdater.refreshHintsForVisibleEditors();
176 } 181 },
177 ); 182 );
178 183
179 disposeOnDeactivation( 184 disposeOnDeactivation(
180 vscode.window.onDidChangeVisibleTextEditors(_ => 185 vscode.window.onDidChangeVisibleTextEditors(_ =>
181 hintsUpdater.refreshHintsForVisibleEditors() 186 hintsUpdater.refreshHintsForVisibleEditors(),
182 ) 187 ),
183 ); 188 );
184 disposeOnDeactivation( 189 disposeOnDeactivation(
185 vscode.workspace.onDidChangeTextDocument(e => 190 vscode.workspace.onDidChangeTextDocument(e =>
186 hintsUpdater.refreshHintsForVisibleEditors(e) 191 hintsUpdater.refreshHintsForVisibleEditors(e),
187 ) 192 ),
188 ); 193 );
189 disposeOnDeactivation( 194 disposeOnDeactivation(
190 vscode.workspace.onDidChangeConfiguration(_ => 195 vscode.workspace.onDidChangeConfiguration(_ =>
191 hintsUpdater.toggleHintsDisplay( 196 hintsUpdater.toggleHintsDisplay(
192 Server.config.displayInlayHints 197 Server.config.displayInlayHints,
193 ) 198 ),
194 ) 199 ),
195 ); 200 );
196 }); 201 });
197 } 202 }
@@ -204,10 +209,10 @@ export function deactivate(): Thenable<void> {
204 return Server.client.stop(); 209 return Server.client.stop();
205} 210}
206 211
207async function reloadServer(startServer: () => void) { 212async function reloadServer(startServer: () => Promise<void>) {
208 if (Server.client != null) { 213 if (Server.client != null) {
209 vscode.window.showInformationMessage('Reloading rust-analyzer...'); 214 vscode.window.showInformationMessage('Reloading rust-analyzer...');
210 await Server.client.stop(); 215 await Server.client.stop();
211 startServer(); 216 await startServer();
212 } 217 }
213} 218}
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts
index 0a38c9ef6..68eae0941 100644
--- a/editors/code/src/highlighting.ts
+++ b/editors/code/src/highlighting.ts
@@ -67,7 +67,7 @@ export class Highlighter {
67 > { 67 > {