"Programming Languages"
],
"engines": {
- "vscode": "^1.57.0"
+ "vscode": "^1.63.0"
},
"enableProposedApi": true,
"scripts": {
"test": "node ./out/tests/runTests.js"
},
"dependencies": {
- "https-proxy-agent": "^5.0.0",
- "node-fetch": "^2.6.1",
- "vscode-languageclient": "8.0.0-next.2",
- "d3": "^7.1.0",
+ "vscode-languageclient": "8.0.0-next.8",
+ "d3": "^7.3.0",
"d3-graphviz": "^4.0.0"
},
"devDependencies": {
- "@types/glob": "^7.1.4",
- "@types/mocha": "^8.2.3",
"@types/node": "~14.17.5",
- "@types/node-fetch": "^2.5.11",
- "@types/vscode": "^1.57.0",
- "@typescript-eslint/eslint-plugin": "^4.28.2",
- "@typescript-eslint/parser": "^4.28.2",
- "esbuild": "^0.12.19",
- "eslint": "^7.30.0",
- "glob": "^7.1.6",
- "mocha": "^9.0.2",
+ "@types/vscode": "~1.63.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.7.0",
"tslib": "^2.3.0",
- "typescript": "^4.3.5",
+ "typescript": "^4.5.5",
"typescript-formatter": "^7.2.2",
- "vsce": "^1.95.1",
- "vscode-test": "^1.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",
"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.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,
}
],
"semanticTokenTypes": [
+ {
+ "id": "angle",
+ "description": "Style for < or >",
+ "superType": "punctuation"
+ },
+ {
+ "id": "arithmetic",
+ "description": "Style for arithmetic operators",
+ "superType": "operator"
+ },
{
"id": "attribute",
"description": "Style for attributes"
},
+ {
+ "id": "attributeBracket",
+ "description": "Style for attribute invocation brackets, that is the `#[` and `]` tokens",
+ "superType": "punctuation"
+ },
+ {
+ "id": "bitwise",
+ "description": "Style for bitwise operators",
+ "superType": "operator"
+ },
{
"id": "boolean",
"description": "Style for boolean literals",
"superType": "keyword"
},
+ {
+ "id": "brace",
+ "description": "Style for { or }",
+ "superType": "punctuation"
+ },
+ {
+ "id": "bracket",
+ "description": "Style for [ or ]",
+ "superType": "punctuation"
+ },
+ {
+ "id": "builtinAttribute",
+ "description": "Style for builtin attributes",
+ "superType": "attribute"
+ },
{
"id": "builtinType",
"description": "Style for builtin types",
"superType": "type"
},
{
- "id": "lifetime",
- "description": "Style for lifetimes"
+ "id": "char",
+ "description": "Style for character literals",
+ "superType": "type"
},
{
- "id": "selfKeyword",
- "description": "Style for the self keyword",
- "superType": "keyword"
+ "id": "colon",
+ "description": "Style for :",
+ "superType": "punctuation"
},
{
- "id": "typeAlias",
- "description": "Style for type aliases",
- "superType": "type"
+ "id": "comma",
+ "description": "Style for ,",
+ "superType": "punctuation"
},
{
- "id": "union",
- "description": "Style for C-style untagged unions",
- "superType": "type"
+ "id": "comparison",
+ "description": "Style for comparison operators",
+ "superType": "operator"
},
{
- "id": "unresolvedReference",
- "description": "Style for names which can not be resolved due to compilation errors"
+ "id": "constParameter",
+ "description": "Style for const generics"
+ },
+ {
+ "id": "derive",
+ "description": "Style for derives",
+ "superType": "attribute"
+ },
+ {
+ "id": "dot",
+ "description": "Style for .",
+ "superType": "punctuation"
+ },
+ {
+ "id": "escapeSequence",
+ "description": "Style for char escapes in strings"
},
{
"id": "formatSpecifier",
"description": "Style for {} placeholders in format strings"
},
{
- "id": "punctuation",
- "description": "generic punctuation"
+ "id": "label",
+ "description": "Style for labels"
},
{
- "id": "parenthesis",
- "description": "( or )",
- "superType": "punctuation"
+ "id": "lifetime",
+ "description": "Style for lifetimes"
},
{
- "id": "bracket",
- "description": "[ or ]",
- "superType": "punctuation"
+ "id": "logical",
+ "description": "Style for logic operators",
+ "superType": "operator"
},
{
- "id": "brace",
- "description": "{ or }",
+ "id": "macroBang",
+ "description": "Style for the ! token of macro calls",
"superType": "punctuation"
},
{
- "id": "angle",
- "description": "< or >",
+ "id": "operator",
+ "description": "Style for operators",
"superType": "punctuation"
},
{
- "id": "comma",
- "description": ",",
+ "id": "parenthesis",
+ "description": "Style for ( or )",
"superType": "punctuation"
},
{
- "id": "colon",
- "description": ":",
- "superType": "punctuation"
+ "id": "punctuation",
+ "description": "Style for generic punctuation"
+ },
+ {
+ "id": "selfKeyword",
+ "description": "Style for the self keyword",
+ "superType": "keyword"
},
{
"id": "semicolon",
- "description": ";",
+ "description": "Style for ;",
"superType": "punctuation"
},
{
- "id": "dot",
- "description": ".",
- "superType": "punctuation"
+ "id": "typeAlias",
+ "description": "Style for type aliases",
+ "superType": "type"
+ },
+ {
+ "id": "union",
+ "description": "Style for C-style untagged unions",
+ "superType": "type"
+ },
+ {
+ "id": "unresolvedReference",
+ "description": "Style for names which can not be resolved due to compilation errors"
}
],
"semanticTokenModifiers": [
"id": "attribute",
"description": "Style for elements within attributes"
},
- {
- "id": "constant",
- "description": "Style for compile-time constants"
- },
{
"id": "callable",
"description": "Style for locals whose types implements one of the `Fn*` traits"
},
+ {
+ "id": "constant",
+ "description": "Style for compile-time constants"
+ },
{
"id": "consuming",
"description": "Style for locals that are being consumed when use in a function call"
"description": "Style for control-flow related tokens, this includes the `?` operator"
},
{
- "id": "definition",
- "description": "Style for mutable bindings"
+ "id": "crateRoot",
+ "description": "Style for names resolving to a crate root"
},
{
"id": "injected",
"attribute": [
"meta.attribute.rust"
],
- "function.attribute": [
- "entity.name.function.attribute.rust"
- ],
"boolean": [
"constant.language.boolean.rust"
],
"builtinType": [
"support.type.primitive.rust"
],
- "lifetime": [
- "storage.modifier.lifetime.rust"
+ "constParameter": [
+ "constant.other.caps.rust"
],
- "typeAlias": [
- "entity.name.type.typeAlias.rust"
+ "enum": [
+ "entity.name.type.enum.rust"
],
- "union": [
- "entity.name.type.union.rust"
+ "formatSpecifier": [
+ "punctuation.section.embedded.rust"
],
- "struct": [
- "entity.name.type.struct.rust"
+ "function": [
+ "entity.name.function.rust"
+ ],
+ "interface": [
+ "entity.name.type.trait.rust"
],
"keyword": [
"keyword.other.rust"
"keyword.controlFlow": [
"keyword.control.rust"
],
+ "lifetime": [
+ "storage.modifier.lifetime.rust"
+ ],
+ "macroBang": [
+ "entity.name.function.macro.rust"
+ ],
+ "method": [
+ "entity.name.function.rust"
+ ],
+ "struct": [
+ "entity.name.type.struct.rust"
+ ],
+ "typeAlias": [
+ "entity.name.type.declaration.rust"
+ ],
+ "union": [
+ "entity.name.type.union.rust"
+ ],
+ "variable": [
+ "variable.other.rust"
+ ],
"variable.constant": [
"variable.other.constant.rust"
],
- "formatSpecifier": [
- "punctuation.section.embedded.rust"
- ],
"*.mutable": [
"markup.underline"
]