X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=editors%2Fcode%2Fpackage.json;h=ffd89d96d4c309a5bb6616c4f6f0cc9eaede7afe;hb=a82caff588f602b171471661f983ee550d4494d6;hp=4b6e5ef33328fca19b10c1844ad65adfe61661e2;hpb=b7afb6fc6ce6c94379c57d3bb64fea2a2064eeac;p=rust.git diff --git a/editors/code/package.json b/editors/code/package.json index 4b6e5ef3332..ffd89d96d4c 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -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", @@ -36,24 +36,22 @@ "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", @@ -186,11 +184,6 @@ "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", @@ -300,29 +293,6 @@ "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", @@ -330,7 +300,7 @@ ], "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": [ @@ -398,6 +368,19 @@ "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", @@ -592,7 +575,47 @@ }, "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": { @@ -610,6 +633,11 @@ "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, @@ -733,8 +761,8 @@ "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" }, @@ -757,6 +785,36 @@ "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, @@ -847,6 +905,13 @@ "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, @@ -860,6 +925,11 @@ "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, @@ -1033,78 +1103,6 @@ } ], "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)", @@ -1220,6 +1218,11 @@ "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", @@ -1239,6 +1242,11 @@ "description": "Style for the self keyword", "superType": "keyword" }, + { + "id": "selfTypeKeyword", + "description": "Style for the self type keyword", + "superType": "keyword" + }, { "id": "semicolon", "description": "Style for ;", @@ -1358,6 +1366,9 @@ "lifetime": [ "storage.modifier.lifetime.rust" ], + "macroBang": [ + "entity.name.function.macro.rust" + ], "method": [ "entity.name.function.rust" ], @@ -1436,10 +1447,6 @@ "command": "rust-analyzer.reload", "when": "inRustProject" }, - { - "command": "rust-analyzer.updateGithubToken", - "when": "inRustProject" - }, { "command": "rust-analyzer.onEnter", "when": "inRustProject"