]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/package.json
Merge #11765
[rust.git] / editors / code / package.json
index da4fa15b02f6ccc287a7ef9e9896638bdc3619a6..ffd89d96d4c309a5bb6616c4f6f0cc9eaede7afe 100644 (file)
@@ -21,9 +21,9 @@
         "Programming Languages"
     ],
     "engines": {
-        "vscode": "^1.61.0"
+        "vscode": "^1.65.0"
     },
-    "enableProposedApi": true,
+    "enabledApiProposals": [],
     "scripts": {
         "vscode:prepublish": "npm run build-base -- --minify",
         "package": "vsce package -o rust-analyzer.vsix",
         "test": "node ./out/tests/runTests.js"
     },
     "dependencies": {
-        "https-proxy-agent": "^5.0.0",
-        "node-fetch": "^3.0.3",
-        "vscode-languageclient": "8.0.0-next.2",
-        "d3": "^7.2.0",
+        "vscode-languageclient": "8.0.0-next.12",
+        "d3": "^7.3.0",
         "d3-graphviz": "^4.0.0"
     },
     "devDependencies": {
         "@types/node": "~14.17.5",
-        "@types/vscode": "^1.61.0",
-        "@typescript-eslint/eslint-plugin": "^5.5.0",
-        "@typescript-eslint/parser": "^5.5.0",
-        "@vscode/test-electron": "^1.6.2",
-        "esbuild": "^0.14.1",
-        "eslint": "^8.3.0",
+        "@types/vscode": "~1.65.0",
+        "@typescript-eslint/eslint-plugin": "^5.10.0",
+        "@typescript-eslint/parser": "^5.10.0",
+        "@vscode/test-electron": "^2.1.1",
+        "esbuild": "^0.14.12",
+        "eslint": "^8.10.0",
         "tslib": "^2.3.0",
-        "typescript": "^4.5.2",
+        "typescript": "^4.5.5",
         "typescript-formatter": "^7.2.2",
-        "vsce": "^2.5.1"
+        "vsce": "^2.6.7"
     },
     "activationEvents": [
         "onLanguage:rust",
                 "title": "Memory Usage (Clears Database)",
                 "category": "Rust Analyzer"
             },
+            {
+                "command": "rust-analyzer.shuffleCrateGraph",
+                "title": "Shuffle Crate Graph",
+                "category": "Rust Analyzer"
+            },
             {
                 "command": "rust-analyzer.reloadWorkspace",
                 "title": "Reload workspace",
                 "title": "Restart server",
                 "category": "Rust Analyzer"
             },
-            {
-                "command": "rust-analyzer.updateGithubToken",
-                "title": "Update Github API token",
-                "category": "Rust Analyzer"
-            },
             {
                 "command": "rust-analyzer.onEnter",
                 "title": "Enhanced enter key",
                     "default": true,
                     "description": "Whether to show inlay hints."
                 },
-                "rust-analyzer.inlayHints.smallerHints": {
-                    "type": "boolean",
-                    "default": true,
-                    "description": "Whether inlay hints font size should be smaller than editor's font size."
-                },
-                "rust-analyzer.updates.channel": {
-                    "type": "string",
-                    "enum": [
-                        "stable",
-                        "nightly"
-                    ],
-                    "default": "stable",
-                    "markdownEnumDescriptions": [
-                        "`stable` updates are shipped weekly, they don't contain cutting-edge features from VSCode proposed APIs but have less bugs in general.",
-                        "`nightly` updates are shipped daily (extension updates automatically by downloading artifacts directly from GitHub), they contain cutting-edge features and latest bug fixes. These releases help us get your feedback very quickly and speed up rust-analyzer development **drastically**."
-                    ],
-                    "markdownDescription": "Choose `nightly` updates to get the latest features and bug fixes every day. While `stable` releases occur weekly and don't contain cutting-edge features from VSCode proposed APIs."
-                },
-                "rust-analyzer.updates.askBeforeDownload": {
-                    "type": "boolean",
-                    "default": false,
-                    "description": "Whether to ask for permission before downloading any files from the Internet."
-                },
                 "rust-analyzer.server.path": {
                     "type": [
                         "null",
                     ],
                     "scope": "machine-overridable",
                     "default": null,
-                    "markdownDescription": "Path to rust-analyzer executable (points to bundled binary by default). If this is set, then `#rust-analyzer.updates.channel#` setting is not used"
+                    "markdownDescription": "Path to rust-analyzer executable (points to bundled binary by default)."
                 },
                 "rust-analyzer.server.extraEnv": {
                     "type": [
                     "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`"
                 },
                 "$generated-start": {},
+                "rust-analyzer.assist.exprFillDefault": {
+                    "markdownDescription": "Placeholder for missing expressions in assists.",
+                    "default": "todo",
+                    "type": "string",
+                    "enum": [
+                        "todo",
+                        "default"
+                    ],
+                    "enumDescriptions": [
+                        "Fill missing expressions with the `todo` macro",
+                        "Fill missing expressions with reasonable defaults, `new` or `default` constructors."
+                    ]
+                },
                 "rust-analyzer.assist.importGranularity": {
                     "markdownDescription": "How imports should be grouped into use statements.",
                     "default": "crate",
                 },
                 "rust-analyzer.completion.snippets": {
                     "markdownDescription": "Custom completion snippets.",
-                    "default": {},
+                    "default": {
+                        "Arc::new": {
+                            "postfix": "arc",
+                            "body": "Arc::new(${receiver})",
+                            "requires": "std::sync::Arc",
+                            "description": "Put the expression into an `Arc`",
+                            "scope": "expr"
+                        },
+                        "Rc::new": {
+                            "postfix": "rc",
+                            "body": "Rc::new(${receiver})",
+                            "requires": "std::rc::Rc",
+                            "description": "Put the expression into an `Rc`",
+                            "scope": "expr"
+                        },
+                        "Box::pin": {
+                            "postfix": "pinbox",
+                            "body": "Box::pin(${receiver})",
+                            "requires": "std::boxed::Box",
+                            "description": "Put the expression into a pinned `Box`",
+                            "scope": "expr"
+                        },
+                        "Ok": {
+                            "postfix": "ok",
+                            "body": "Ok(${receiver})",
+                            "description": "Wrap the expression in a `Result::Ok`",
+                            "scope": "expr"
+                        },
+                        "Err": {
+                            "postfix": "err",
+                            "body": "Err(${receiver})",
+                            "description": "Wrap the expression in a `Result::Err`",
+                            "scope": "expr"
+                        },
+                        "Some": {
+                            "postfix": "some",
+                            "body": "Some(${receiver})",
+                            "description": "Wrap the expression in an `Option::Some`",
+                            "scope": "expr"
+                        }
+                    },
                     "type": "object"
                 },
                 "rust-analyzer.completion.postfix.enable": {
                     "default": true,
                     "type": "boolean"
                 },
+                "rust-analyzer.completion.privateEditable.enable": {
+                    "markdownDescription": "Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.",
+                    "default": false,
+                    "type": "boolean"
+                },
                 "rust-analyzer.diagnostics.enable": {
                     "markdownDescription": "Whether to show native rust-analyzer diagnostics.",
                     "default": true,
                     "default": true,
                     "type": "boolean"
                 },
-                "rust-analyzer.inlayHints.chainingHints": {
-                    "markdownDescription": "Whether to show inlay type hints for method chains.",
+                "rust-analyzer.inlayHints.renderColons": {
+                    "markdownDescription": "Whether to render trailing colons for parameter hints, and trailing colons for parameter hints.",
                     "default": true,
                     "type": "boolean"
                 },
                     "default": true,
                     "type": "boolean"
                 },
+                "rust-analyzer.inlayHints.chainingHints": {
+                    "markdownDescription": "Whether to show inlay type hints for method chains.",
+                    "default": true,
+                    "type": "boolean"
+                },
+                "rust-analyzer.inlayHints.closureReturnTypeHints": {
+                    "markdownDescription": "Whether to show inlay type hints for return types of closures with blocks.",
+                    "default": false,
+                    "type": "boolean"
+                },
+                "rust-analyzer.inlayHints.lifetimeElisionHints": {
+                    "markdownDescription": "Whether to show inlay type hints for elided lifetimes in function signatures.",
+                    "default": "never",
+                    "type": "string",
+                    "enum": [
+                        "always",
+                        "never",
+                        "skip_trivial"
+                    ],
+                    "enumDescriptions": [
+                        "Always show lifetime elision hints.",
+                        "Never show lifetime elision hints.",
+                        "Only show lifetime elision hints if a return type is involved."
+                    ]
+                },
+                "rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames": {
+                    "markdownDescription": "Whether to prefer using parameter names as the name for elided lifetime hints if possible.",
+                    "default": false,
+                    "type": "boolean"
+                },
                 "rust-analyzer.inlayHints.hideNamedConstructorHints": {
                     "markdownDescription": "Whether to hide inlay hints for constructors.",
                     "default": false,
                     "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.enable": {
                     "markdownDescription": "Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts#`.",
                     "default": true,
                         "string"
                     ]
                 },
+                "rust-analyzer.procMacro.ignored": {
+                    "markdownDescription": "These proc-macros will be ignored when trying to expand them.\n\nThis config takes a map of crate names with the exported proc-macro names to ignore as values.",
+                    "default": {},
+                    "type": "object"
+                },
                 "rust-analyzer.runnables.overrideCargo": {
                     "markdownDescription": "Command to be executed instead of 'cargo' for runnables.",
                     "default": null,
             }
         ],
         "colors": [
-            {
-                "id": "rust_analyzer.inlayHints.foreground",
-                "description": "Foreground color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.foreground.* configurations)",
-                "defaults": {
-                    "dark": "#A0A0A0F0",
-                    "light": "#747474",
-                    "highContrast": "#BEBEBE"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.background",
-                "description": "Background color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.background.* configurations)",
-                "defaults": {
-                    "dark": "#11223300",
-                    "light": "#11223300",
-                    "highContrast": "#11223300"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.foreground.typeHints",
-                "description": "Foreground color of inlay type hints for variables (overrides rust_analyzer.inlayHints.foreground)",
-                "defaults": {
-                    "dark": "rust_analyzer.inlayHints.foreground",
-                    "light": "rust_analyzer.inlayHints.foreground",
-                    "highContrast": "rust_analyzer.inlayHints.foreground"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.foreground.chainingHints",
-                "description": "Foreground color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.foreground)",
-                "defaults": {
-                    "dark": "rust_analyzer.inlayHints.foreground",
-                    "light": "rust_analyzer.inlayHints.foreground",
-                    "highContrast": "rust_analyzer.inlayHints.foreground"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.foreground.parameterHints",
-                "description": "Foreground color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.foreground)",
-                "defaults": {
-                    "dark": "rust_analyzer.inlayHints.foreground",
-                    "light": "rust_analyzer.inlayHints.foreground",
-                    "highContrast": "rust_analyzer.inlayHints.foreground"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.background.typeHints",
-                "description": "Background color of inlay type hints for variables (overrides rust_analyzer.inlayHints.background)",
-                "defaults": {
-                    "dark": "rust_analyzer.inlayHints.background",
-                    "light": "rust_analyzer.inlayHints.background",
-                    "highContrast": "rust_analyzer.inlayHints.background"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.background.chainingHints",
-                "description": "Background color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.background)",
-                "defaults": {
-                    "dark": "rust_analyzer.inlayHints.background",
-                    "light": "rust_analyzer.inlayHints.background",
-                    "highContrast": "rust_analyzer.inlayHints.background"
-                }
-            },
-            {
-                "id": "rust_analyzer.inlayHints.background.parameterHints",
-                "description": "Background color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.background)",
-                "defaults": {
-                    "dark": "rust_analyzer.inlayHints.background",
-                    "light": "rust_analyzer.inlayHints.background",
-                    "highContrast": "rust_analyzer.inlayHints.background"
-                }
-            },
             {
                 "id": "rust_analyzer.syntaxTreeBorder",
                 "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)",
                 "description": "Style for logic operators",
                 "superType": "operator"
             },
+            {
+                "id": "macroBang",
+                "description": "Style for the ! token of macro calls",
+                "superType": "punctuation"
+            },
             {
                 "id": "operator",
                 "description": "Style for operators",
                 "description": "Style for the self keyword",
                 "superType": "keyword"
             },
+            {
+                "id": "selfTypeKeyword",
+                "description": "Style for the self type keyword",
+                "superType": "keyword"
+            },
             {
                 "id": "semicolon",
                 "description": "Style for ;",
                     "lifetime": [
                         "storage.modifier.lifetime.rust"
                     ],
+                    "macroBang": [
+                        "entity.name.function.macro.rust"
+                    ],
                     "method": [
                         "entity.name.function.rust"
                     ],
                     "command": "rust-analyzer.reload",
                     "when": "inRustProject"
                 },
-                {
-                    "command": "rust-analyzer.updateGithubToken",
-                    "when": "inRustProject"
-                },
                 {
                     "command": "rust-analyzer.onEnter",
                     "when": "inRustProject"