]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/package.json
prettier config
[rust.git] / editors / code / package.json
index 515ecd0295a87e818aa4f114e0974555cc1b91a3..e2888a088dc5b1f3f00e5ffa2eb7191447f3fce9 100644 (file)
@@ -1,15 +1,14 @@
 {
     "name": "rust-analyzer",
     "displayName": "rust-analyzer",
-    "description": "An alternative rust language server to the RLS",
-    "preview": true,
+    "description": "Rust language support for Visual Studio Code",
     "private": true,
     "icon": "icon.png",
-    "version": "0.4.0-dev",
+    "version": "0.5.0-dev",
     "releaseTag": null,
-    "publisher": "matklad",
+    "publisher": "rust-lang",
     "repository": {
-        "url": "https://github.com/rust-analyzer/rust-analyzer.git",
+        "url": "https://github.com/rust-lang/rust-analyzer.git",
         "type": "git"
     },
     "homepage": "https://rust-analyzer.github.io/",
         "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",
         "fix": " tsfmt -r       && eslint -c .eslintrc.js --ext ts ./src ./tests --fix",
         "pretest": "tsc && npm run build",
-        "test": "node ./out/tests/runTests.js"
+        "test": "cross-env TEST_VARIABLE=test node ./out/tests/runTests.js"
     },
     "dependencies": {
-        "vscode-languageclient": "8.0.0-next.14",
         "d3": "^7.3.0",
-        "d3-graphviz": "^4.1.0"
+        "d3-graphviz": "^4.1.0",
+        "vscode-languageclient": "8.0.0-next.14"
     },
     "devDependencies": {
         "@types/node": "~14.17.5",
         "@typescript-eslint/eslint-plugin": "^5.16.0",
         "@typescript-eslint/parser": "^5.16.0",
         "@vscode/test-electron": "^2.1.3",
+        "cross-env": "^7.0.3",
         "esbuild": "^0.14.27",
         "eslint": "^8.11.0",
+        "eslint-config-prettier": "^8.5.0",
+        "prettier": "^2.6.2",
         "tslib": "^2.3.0",
         "typescript": "^4.6.3",
         "typescript-formatter": "^7.2.2",
                         "Fill missing expressions with reasonable defaults, `new` or `default` constructors."
                     ]
                 },
+                "rust-analyzer.cachePriming.enable": {
+                    "markdownDescription": "Warm up caches on project load.",
+                    "default": true,
+                    "type": "boolean"
+                },
+                "rust-analyzer.cachePriming.numThreads": {
+                    "markdownDescription": "How many worker threads to to handle priming caches. The default `0` means to pick automatically.",
+                    "default": 0,
+                    "type": "number",
+                    "minimum": 0,
+                    "maximum": 255
+                },
                 "rust-analyzer.cargo.autoreload": {
                     "markdownDescription": "Automatically refresh project info via `cargo metadata` on\n`Cargo.toml` or `.cargo/config.toml` changes.",
                     "default": true,
                 "rust-analyzer.cargo.features": {
                     "markdownDescription": "List of features to activate.\n\nSet this to `\"all\"` to pass `--all-features` to cargo.",
                     "default": [],
-                    "type": [
-                        "string",
-                        "array"
-                    ],
-                    "items": {
-                        "type": "string"
-                    },
-                    "enum": [
-                        "all"
-                    ],
-                    "enumDescriptions": [
-                        "Pass `--all-features` to cargo"
+                    "anyOf": [
+                        {
+                            "type": "string",
+                            "enum": [
+                                "all"
+                            ],
+                            "enumDescriptions": [
+                                "Pass `--all-features` to cargo"
+                            ]
+                        },
+                        {
+                            "type": "array",
+                            "items": {
+                                "type": "string"
+                            }
+                        }
                     ]
                 },
                 "rust-analyzer.cargo.noDefaultFeatures": {
                 "rust-analyzer.checkOnSave.features": {
                     "markdownDescription": "List of features to activate. Defaults to\n`#rust-analyzer.cargo.features#`.\n\nSet to `\"all\"` to pass `--all-features` to cargo.",
                     "default": null,
-                    "type": [
-                        "string",
-                        "array",
-                        "null"
-                    ],
-                    "items": {
-                        "type": "string"
-                    },
-                    "enum": [
-                        "all"
-                    ],
-                    "enumDescriptions": [
-                        "Pass `--all-features` to cargo"
+                    "anyOf": [
+                        {
+                            "type": "string",
+                            "enum": [
+                                "all"
+                            ],
+                            "enumDescriptions": [
+                                "Pass `--all-features` to cargo"
+                            ]
+                        },
+                        {
+                            "type": "array",
+                            "items": {
+                                "type": "string"
+                            }
+                        },
+                        {
+                            "type": "null"
+                        }
                     ]
                 },
                 "rust-analyzer.checkOnSave.noDefaultFeatures": {
-                    "markdownDescription": "Do not activate the `default` feature.",
+                    "markdownDescription": "Whether to pass `--no-default-features` to cargo. Defaults to\n`#rust-analyzer.cargo.noDefaultFeatures#`.",
                     "default": null,
                     "type": [
                         "null",
                 "rust-analyzer.completion.callable.snippets": {
                     "markdownDescription": "Whether to add parenthesis and argument snippets when completing function.",
                     "default": "fill_arguments",
-                    "type": [
-                        "string",
-                        "null"
-                    ],
+                    "type": "string",
                     "enum": [
                         "fill_arguments",
-                        "add_parentheses"
+                        "add_parentheses",
+                        "none"
                     ],
                     "enumDescriptions": [
-                        "Add call parentheses and pre-fill arguments",
-                        "Add call parentheses"
+                        "Add call parentheses and pre-fill arguments.",
+                        "Add call parentheses.",
+                        "Do no snippet completions for callables."
                     ]
                 },
                 "rust-analyzer.completion.postfix.enable": {
                     "type": "boolean"
                 },
                 "rust-analyzer.hover.actions.debug.enable": {
-                    "markdownDescription": "Whether to show `Debug` action. Only applies when\n`#rust-analyzer.hoverActions.enable#` is set.",
+                    "markdownDescription": "Whether to show `Debug` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",
                     "default": true,
                     "type": "boolean"
                 },
                     "type": "boolean"
                 },
                 "rust-analyzer.hover.actions.gotoTypeDef.enable": {
-                    "markdownDescription": "Whether to show `Go to Type Definition` action. Only applies when\n`#rust-analyzer.hoverActions.enable#` is set.",
+                    "markdownDescription": "Whether to show `Go to Type Definition` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",
                     "default": true,
                     "type": "boolean"
                 },
                 "rust-analyzer.hover.actions.implementations.enable": {
-                    "markdownDescription": "Whether to show `Implementations` action. Only applies when\n`#rust-analyzer.hoverActions.enable#` is set.",
+                    "markdownDescription": "Whether to show `Implementations` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",
                     "default": true,
                     "type": "boolean"
                 },
                 "rust-analyzer.hover.actions.references.enable": {
-                    "markdownDescription": "Whether to show `References` action. Only applies when\n`#rust-analyzer.hoverActions.enable#` is set.",
+                    "markdownDescription": "Whether to show `References` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",
                     "default": false,
                     "type": "boolean"
                 },
                 "rust-analyzer.hover.actions.run.enable": {
-                    "markdownDescription": "Whether to show `Run` action. Only applies when\n`#rust-analyzer.hoverActions.enable#` is set.",
+                    "markdownDescription": "Whether to show `Run` action. Only applies when\n`#rust-analyzer.hover.actions.enable#` is set.",
                     "default": true,
                     "type": "boolean"
                 },
                         "Force import paths to be absolute by always starting them with `crate` or the extern crate name they come from."
                     ]
                 },
+                "rust-analyzer.inlayHints.bindingModeHints.enable": {
+                    "markdownDescription": "Whether to show inlay type hints for binding modes.",
+                    "default": false,
+                    "type": "boolean"
+                },
                 "rust-analyzer.inlayHints.chainingHints.enable": {
                     "markdownDescription": "Whether to show inlay type hints for method chains.",
                     "default": true,
                     "type": "boolean"
                 },
+                "rust-analyzer.inlayHints.closingBraceHints.enable": {
+                    "markdownDescription": "Whether to show inlay hints after a closing `}` to indicate what item it belongs to.",
+                    "default": true,
+                    "type": "boolean"
+                },
+                "rust-analyzer.inlayHints.closingBraceHints.minLines": {
+                    "markdownDescription": "Minimum number of lines required before the `}` until the hint is shown (set to 0 or 1\nto always show them).",
+                    "default": 25,
+                    "type": "integer",
+                    "minimum": 0
+                },
                 "rust-analyzer.inlayHints.closureReturnTypeHints.enable": {
                     "markdownDescription": "Whether to show inlay type hints for return types of closures with blocks.",
                     "default": false,
                 "rust-analyzer.inlayHints.lifetimeElisionHints.enable": {
                     "markdownDescription": "Whether to show inlay type hints for elided lifetimes in function signatures.",
                     "default": "never",
-                    "type": [
-                        "string",
-                        "boolean"
-                    ],
+                    "type": "string",
                     "enum": [
                         "always",
                         "never",
                 },
                 "rust-analyzer.inlayHints.reborrowHints.enable": {
                     "markdownDescription": "Whether to show inlay type hints for compiler inserted reborrows.",
-                    "default": false,
-                    "type": "boolean"
+                    "default": "never",
+                    "type": "string",
+                    "enum": [
+                        "always",
+                        "never",
+                        "mutable"
+                    ],
+                    "enumDescriptions": [
+                        "Always show reborrow hints.",
+                        "Never show reborrow hints.",
+                        "Only show mutable reborrow hints."
+                    ]
                 },
                 "rust-analyzer.inlayHints.renderColons": {
-                    "markdownDescription": "Whether to render trailing colons for parameter hints, and trailing colons for parameter hints.",
+                    "markdownDescription": "Whether to render leading colons for type hints, and trailing colons for parameter hints.",
                     "default": true,
                     "type": "boolean"
                 },
                     "default": true,
                     "type": "boolean"
                 },
-                "rust-analyzer.primeCaches.enable": {
-                    "markdownDescription": "Warm up caches on project load.",
-                    "default": true,
-                    "type": "boolean"
-                },
-                "rust-analyzer.primeCaches.numThreads": {
-                    "markdownDescription": "How many worker threads to to handle priming caches. The default `0` means to pick automatically.",
-                    "default": 0,
-                    "type": "number",
-                    "minimum": 0,
-                    "maximum": 255
-                },
                 "rust-analyzer.procMacro.attributes.enable": {
                     "markdownDescription": "Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.",
                     "default": true,
                         "all_symbols"
                     ],
                     "enumDescriptions": [
-                        "Search for types only",
-                        "Search for all symbols kinds"
+                        "Search for types only.",
+                        "Search for all symbols kinds."
                     ]
                 },
                 "rust-analyzer.workspace.symbol.search.limit": {
                         "workspace_and_dependencies"
                     ],
                     "enumDescriptions": [
-                        "Search in current workspace only",
-                        "Search in current workspace and dependencies"
+                        "Search in current workspace only.",
+                        "Search in current workspace and dependencies."
                     ]
                 },
                 "$generated-end": {}
                 "superType": "type"
             },
             {
-                "id": "char",
+                "id": "character",
                 "description": "Style for character literals",
-                "superType": "type"
+                "superType": "string"
             },
             {
                 "id": "colon",