aboutsummaryrefslogtreecommitdiff
path: root/editors/code/package.json
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/package.json')
-rw-r--r--editors/code/package.json246
1 files changed, 209 insertions, 37 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index d30673791..d8f4287fd 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -21,7 +21,7 @@
21 "Programming Languages" 21 "Programming Languages"
22 ], 22 ],
23 "engines": { 23 "engines": {
24 "vscode": "^1.44.0" 24 "vscode": "^1.44.1"
25 }, 25 },
26 "enableProposedApi": true, 26 "enableProposedApi": true,
27 "scripts": { 27 "scripts": {
@@ -29,28 +29,34 @@
29 "package": "vsce package -o rust-analyzer.vsix", 29 "package": "vsce package -o rust-analyzer.vsix",
30 "build": "tsc", 30 "build": "tsc",
31 "watch": "tsc --watch", 31 "watch": "tsc --watch",
32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src", 32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",
33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src --fix" 33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix",
34 "pretest": "npm run build",
35 "test": "node ./out/tests/runTests.js"
34 }, 36 },
35 "dependencies": { 37 "dependencies": {
36 "jsonc-parser": "^2.2.1",
37 "node-fetch": "^2.6.0", 38 "node-fetch": "^2.6.0",
38 "vscode-languageclient": "7.0.0-next.1" 39 "vscode-languageclient": "7.0.0-next.1"
39 }, 40 },
40 "devDependencies": { 41 "devDependencies": {
41 "@rollup/plugin-commonjs": "^11.1.0", 42 "@rollup/plugin-commonjs": "^12.0.0",
42 "@rollup/plugin-node-resolve": "^7.1.3", 43 "@rollup/plugin-node-resolve": "^8.0.0",
43 "@types/node": "^12.12.37", 44 "@types/glob": "^7.1.1",
44 "@types/node-fetch": "^2.5.6", 45 "@types/mocha": "^7.0.2",
45 "@types/vscode": "^1.44.0", 46 "@types/node": "^14.0.5",
46 "@typescript-eslint/eslint-plugin": "^2.29.0", 47 "@types/node-fetch": "^2.5.7",
47 "@typescript-eslint/parser": "^2.29.0", 48 "@types/vscode": "^1.44.1",
48 "eslint": "^6.8.0", 49 "@typescript-eslint/eslint-plugin": "^3.0.0",
49 "rollup": "^2.7.1", 50 "@typescript-eslint/parser": "^3.0.0",
50 "tslib": "^1.11.1", 51 "eslint": "^7.0.0",
51 "typescript": "^3.8.3", 52 "glob": "^7.1.6",
53 "mocha": "^7.1.2",
54 "rollup": "^2.10.7",
55 "tslib": "^2.0.0",
56 "typescript": "^3.9.3",
52 "typescript-formatter": "^7.2.2", 57 "typescript-formatter": "^7.2.2",
53 "vsce": "^1.75.0" 58 "vsce": "^1.75.0",
59 "vscode-test": "^1.3.0"
54 }, 60 },
55 "activationEvents": [ 61 "activationEvents": [
56 "onLanguage:rust", 62 "onLanguage:rust",
@@ -58,7 +64,7 @@
58 "onCommand:rust-analyzer.collectGarbage", 64 "onCommand:rust-analyzer.collectGarbage",
59 "workspaceContains:**/Cargo.toml" 65 "workspaceContains:**/Cargo.toml"
60 ], 66 ],
61 "main": "./out/main", 67 "main": "./out/src/main",
62 "contributes": { 68 "contributes": {
63 "taskDefinitions": [ 69 "taskDefinitions": [
64 { 70 {
@@ -122,6 +128,16 @@
122 "category": "Rust Analyzer" 128 "category": "Rust Analyzer"
123 }, 129 },
124 { 130 {
131 "command": "rust-analyzer.debug",
132 "title": "Debug",
133 "category": "Rust Analyzer"
134 },
135 {
136 "command": "rust-analyzer.newDebugConfig",
137 "title": "Generate launch configuration",
138 "category": "Rust Analyzer"
139 },
140 {
125 "command": "rust-analyzer.analyzerStatus", 141 "command": "rust-analyzer.analyzerStatus",
126 "title": "Status", 142 "title": "Status",
127 "category": "Rust Analyzer" 143 "category": "Rust Analyzer"
@@ -150,6 +166,11 @@
150 "command": "rust-analyzer.serverVersion", 166 "command": "rust-analyzer.serverVersion",
151 "title": "Show RA Version", 167 "title": "Show RA Version",
152 "category": "Rust Analyzer" 168 "category": "Rust Analyzer"
169 },
170 {
171 "command": "rust-analyzer.toggleInlayHints",
172 "title": "Toggle inlay hints",
173 "category": "Rust Analyzer"
153 } 174 }
154 ], 175 ],
155 "keybindings": [ 176 "keybindings": [
@@ -205,11 +226,6 @@
205 "default": [], 226 "default": [],
206 "description": "Paths to exclude from analysis." 227 "description": "Paths to exclude from analysis."
207 }, 228 },
208 "rust-analyzer.notifications.workspaceLoaded": {
209 "type": "boolean",
210 "default": true,
211 "markdownDescription": "Whether to show `workspace loaded` message."
212 },
213 "rust-analyzer.notifications.cargoTomlNotFound": { 229 "rust-analyzer.notifications.cargoTomlNotFound": {
214 "type": "boolean", 230 "type": "boolean",
215 "default": true, 231 "default": true,
@@ -222,7 +238,7 @@
222 }, 238 },
223 "rust-analyzer.cargo.allFeatures": { 239 "rust-analyzer.cargo.allFeatures": {
224 "type": "boolean", 240 "type": "boolean",
225 "default": true, 241 "default": false,
226 "description": "Activate all available features" 242 "description": "Activate all available features"
227 }, 243 },
228 "rust-analyzer.cargo.features": { 244 "rust-analyzer.cargo.features": {
@@ -238,6 +254,14 @@
238 "default": false, 254 "default": false,
239 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" 255 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
240 }, 256 },
257 "rust-analyzer.cargo.target": {
258 "type": [
259 "null",
260 "string"
261 ],
262 "default": null,
263 "description": "Specify the compilation target"
264 },
241 "rust-analyzer.rustfmt.extraArgs": { 265 "rust-analyzer.rustfmt.extraArgs": {
242 "type": "array", 266 "type": "array",
243 "items": { 267 "items": {
@@ -286,27 +310,37 @@
286 "minItems": 1 310 "minItems": 1
287 }, 311 },
288 "default": null, 312 "default": null,
289 "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message=format=json` or similar option." 313 "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message-format=json` or similar option."
290 }, 314 },
291 "rust-analyzer.checkOnSave.allTargets": { 315 "rust-analyzer.checkOnSave.allTargets": {
292 "type": "boolean", 316 "type": "boolean",
293 "default": true, 317 "default": true,
294 "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)" 318 "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`)"
295 }, 319 },
320 "rust-analyzer.checkOnSave.allFeatures": {
321 "type": "boolean",
322 "default": false,
323 "markdownDescription": "Check with all features (will be passed as `--all-features`)"
324 },
325 "rust-analyzer.inlayHints.enable": {
326 "type": "boolean",
327 "default": true,
328 "description": "Whether to show inlay hints"
329 },
296 "rust-analyzer.inlayHints.typeHints": { 330 "rust-analyzer.inlayHints.typeHints": {
297 "type": "boolean", 331 "type": "boolean",
298 "default": true, 332 "default": true,
299 "description": "Whether to show inlay type hints" 333 "description": "Whether to show inlay type hints for variables."
300 }, 334 },
301 "rust-analyzer.inlayHints.chainingHints": { 335 "rust-analyzer.inlayHints.chainingHints": {
302 "type": "boolean", 336 "type": "boolean",
303 "default": true, 337 "default": true,
304 "description": "Whether to show inlay type hints for method chains" 338 "description": "Whether to show inlay type hints for method chains."
305 }, 339 },
306 "rust-analyzer.inlayHints.parameterHints": { 340 "rust-analyzer.inlayHints.parameterHints": {
307 "type": "boolean", 341 "type": "boolean",
308 "default": true, 342 "default": true,
309 "description": "Whether to show function parameter name inlay hints at the call site" 343 "description": "Whether to show function parameter name inlay hints at the call site."
310 }, 344 },
311 "rust-analyzer.inlayHints.maxLength": { 345 "rust-analyzer.inlayHints.maxLength": {
312 "type": [ 346 "type": [
@@ -398,7 +432,7 @@
398 "ms-vscode.cpptools" 432 "ms-vscode.cpptools"
399 ], 433 ],
400 "default": "auto", 434 "default": "auto",
401 "description": "Preffered debug engine.", 435 "description": "Preferred debug engine.",
402 "markdownEnumDescriptions": [ 436 "markdownEnumDescriptions": [
403 "First try to use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb), if it's not installed try to use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).", 437 "First try to use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb), if it's not installed try to use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).",
404 "Use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)", 438 "Use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)",
@@ -411,6 +445,36 @@
411 "default": { 445 "default": {
412 "/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust" 446 "/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"
413 } 447 }
448 },
449 "rust-analyzer.debug.openDebugPane": {
450 "description": "Whether to open up the Debug Pane on debugging start.",
451 "type": "boolean",
452 "default": false
453 },
454 "rust-analyzer.debug.engineSettings": {
455 "type": "object",
456 "default": {},
457 "description": "Optional settings passed to the debug engine. Example:\n{ \"lldb\": { \"terminal\":\"external\"} }"
458 },
459 "rust-analyzer.lens.enable": {
460 "description": "Whether to show CodeLens in Rust files.",
461 "type": "boolean",
462 "default": true
463 },
464 "rust-analyzer.lens.run": {
465 "markdownDescription": "Whether to show Run lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
466 "type": "boolean",
467 "default": true
468 },
469 "rust-analyzer.lens.debug": {
470 "markdownDescription": "Whether to show Debug lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
471 "type": "boolean",
472 "default": true
473 },
474 "rust-analyzer.lens.implementations": {
475 "markdownDescription": "Whether to show Implementations lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
476 "type": "boolean",
477 "default": true
414 } 478 }
415 } 479 }
416 }, 480 },
@@ -457,6 +521,11 @@
457 ], 521 ],
458 "grammars": [ 522 "grammars": [
459 { 523 {
524 "language": "rust",
525 "scopeName": "source.rust",
526 "path": "rust.tmGrammar.json"
527 },
528 {
460 "language": "ra_syntax_tree", 529 "language": "ra_syntax_tree",
461 "scopeName": "source.ra_syntax_tree", 530 "scopeName": "source.ra_syntax_tree",
462 "path": "ra_syntax_tree.tmGrammar.json" 531 "path": "ra_syntax_tree.tmGrammar.json"
@@ -518,6 +587,11 @@
518 "description": "Style for attributes" 587 "description": "Style for attributes"
519 }, 588 },
520 { 589 {
590 "id": "boolean",
591 "description": "Style for boolean literals",
592 "superType": "keyword"
593 },
594 {
521 "id": "builtinType", 595 "id": "builtinType",
522 "description": "Style for builtin types", 596 "description": "Style for builtin types",
523 "superType": "type" 597 "superType": "type"
@@ -527,6 +601,11 @@
527 "description": "Style for lifetimes" 601 "description": "Style for lifetimes"
528 }, 602 },
529 { 603 {
604 "id": "selfKeyword",
605 "description": "Style for the self keyword",
606 "superType": "keyword"
607 },
608 {
530 "id": "typeAlias", 609 "id": "typeAlias",
531 "description": "Style for type aliases", 610 "description": "Style for type aliases",
532 "superType": "type" 611 "superType": "type"
@@ -539,10 +618,18 @@
539 { 618 {
540 "id": "unresolvedReference", 619 "id": "unresolvedReference",
541 "description": "Style for names which can not be resolved due to compilation errors" 620 "description": "Style for names which can not be resolved due to compilation errors"
621 },
622 {
623 "id": "formatSpecifier",
624 "description": "Style for {} placeholders in format strings"
542 } 625 }
543 ], 626 ],
544 "semanticTokenModifiers": [ 627 "semanticTokenModifiers": [
545 { 628 {
629 "id": "attribute",
630 "description": "Style for elements within attributes"
631 },
632 {
546 "id": "constant", 633 "id": "constant",
547 "description": "Style for compile-time constants" 634 "description": "Style for compile-time constants"
548 }, 635 },
@@ -563,29 +650,114 @@
563 { 650 {
564 "language": "rust", 651 "language": "rust",
565 "scopes": { 652 "scopes": {
653 "macro": [
654 "entity.name.function.macro.rust"
655 ],
566 "attribute": [ 656 "attribute": [
567 "meta.attribute" 657 "meta.attribute.rust"
658 ],
659 "function.attribute": [
660 "entity.name.function.attribute.rust"
661 ],
662 "boolean": [
663 "constant.language.boolean.rust"
568 ], 664 ],
569 "builtinType": [ 665 "builtinType": [
570 "support.type.primitive" 666 "support.type.primitive.rust"
571 ], 667 ],
572 "lifetime": [ 668 "lifetime": [
573 "entity.name.lifetime.rust" 669 "storage.modifier.lifetime.rust"
574 ], 670 ],
575 "typeAlias": [ 671 "typeAlias": [
576 "entity.name.typeAlias" 672 "entity.name.type.typeAlias.rust"
577 ], 673 ],
578 "union": [ 674 "union": [
579 "entity.name.union" 675 "entity.name.type.union.rust"
676 ],
677 "struct": [
678 "entity.name.type.struct.rust"
580 ], 679 ],
581 "keyword.unsafe": [ 680 "keyword": [
582 "keyword.other.unsafe" 681 "keyword.other.rust"
682 ],
683 "keyword.controlFlow": [
684 "keyword.control.rust"
583 ], 685 ],
584 "variable.constant": [ 686 "variable.constant": [
585 "entity.name.constant" 687 "variable.other.constant.rust"
688 ],
689 "formatSpecifier": [
690 "punctuation.section.embedded.rust"
691 ],
692 "*.mutable": [
693 "markup.underline"
586 ] 694 ]
587 } 695 }
588 } 696 }
589 ] 697 ],
698 "menus": {
699 "commandPalette": [
700 {
701 "command": "rust-analyzer.syntaxTree",
702 "when": "inRustProject"
703 },
704 {
705 "command": "rust-analyzer.expandMacro",
706 "when": "inRustProject"
707 },
708 {
709 "command": "rust-analyzer.matchingBrace",
710 "when": "inRustProject"
711 },
712 {
713 "command": "rust-analyzer.parentModule",
714 "when": "inRustProject"
715 },
716 {
717 "command": "rust-analyzer.joinLines",
718 "when": "inRustProject"
719 },
720 {
721 "command": "rust-analyzer.run",
722 "when": "inRustProject"
723 },
724 {
725 "command": "rust-analyzer.debug",
726 "when": "inRustProject"
727 },
728 {
729 "command": "rust-analyzer.newDebugConfig",
730 "when": "inRustProject"
731 },
732 {
733 "command": "rust-analyzer.analyzerStatus",
734 "when": "inRustProject"
735 },
736 {
737 "command": "rust-analyzer.collectGarbage",
738 "when": "inRustProject"
739 },
740 {
741 "command": "rust-analyzer.reload",
742 "when": "inRustProject"
743 },
744 {
745 "command": "rust-analyzer.onEnter",
746 "when": "inRustProject"
747 },
748 {
749 "command": "rust-analyzer.ssr",
750 "when": "inRustProject"
751 },
752 {
753 "command": "rust-analyzer.serverVersion",
754 "when": "inRustProject"
755 },
756 {
757 "command": "rust-analyzer.toggleInlayHints",
758 "when": "inRustProject"
759 }
760 ]
761 }
590 } 762 }
591} 763}