"scripts": {
"vscode:prepublish": "npm run build-base -- --minify",
"package": "vsce package -o rust-analyzer.vsix",
- "build-base": "esbuild ./src/main.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
+ "build-base": "esbuild ./src/main.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node --target=node14",
"build": "npm run build-base -- --sourcemap",
"watch": "npm run build-base -- --sourcemap --watch",
"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",
+ "pretest": "tsc --noEmit && npm run build",
"test": "node ./out/tests/runTests.js"
},
"dependencies": {
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.1",
- "vscode-languageclient": "^7.1.0-next.5",
- "d3": "^7.0.0",
+ "vscode-languageclient": "8.0.0-next.2",
+ "d3": "^7.1.0",
"d3-graphviz": "^4.0.0"
},
"devDependencies": {
"onCommand:rust-analyzer.analyzerStatus",
"onCommand:rust-analyzer.memoryUsage",
"onCommand:rust-analyzer.reloadWorkspace",
- "workspaceContains:**/Cargo.toml"
+ "workspaceContains:*/Cargo.toml",
+ "workspaceContains:*/rust-project.json"
],
"main": "./out/main",
"contributes": {
"default": true,
"type": "boolean"
},
+ "rust-analyzer.completion.snippets": {
+ "markdownDescription": "Custom completion snippets.",
+ "default": {},
+ "type": "object"
+ },
"rust-analyzer.completion.postfix.enable": {
"markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc.",
"default": true,
},
"rust-analyzer.experimental.procAttrMacros": {
"markdownDescription": "Expand attribute macros.",
- "default": false,
+ "default": true,
"type": "boolean"
},
"rust-analyzer.files.watcher": {
"default": true,
"type": "boolean"
},
+ "rust-analyzer.inlayHints.hideNamedConstructorHints": {
+ "markdownDescription": "Whether to hide inlay hints for constructors.",
+ "default": false,
+ "type": "boolean"
+ },
"rust-analyzer.joinLines.joinElseIf": {
"markdownDescription": "Join lines inserts else between consecutive ifs.",
"default": true,
"default": true,
"type": "boolean"
},
+ "rust-analyzer.joinLines.joinAssignments": {
+ "markdownDescription": "Join lines merges consecutive declaration and initialization of an assignment.",
+ "default": true,
+ "type": "boolean"
+ },
"rust-analyzer.lens.debug": {
"markdownDescription": "Whether to show `Debug` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",
"default": true,
"type": "boolean"
},
"rust-analyzer.lens.references": {
- "markdownDescription": "Whether to show `References` lens. Only applies when\n`#rust-analyzer.lens.enable#` is set.",
+ "markdownDescription": "Whether to show `References` lens for Struct, Enum, Union and Trait.\nOnly applies when `#rust-analyzer.lens.enable#` is set.",
+ "default": false,
+ "type": "boolean"
+ },
+ "rust-analyzer.lens.enumVariantReferences": {
+ "markdownDescription": "Whether to show `References` lens for Enum Variants.\nOnly applies when `#rust-analyzer.lens.enable#` is set.",
"default": false,
"type": "boolean"
},
}
},
"rust-analyzer.rustcSource": {
- "markdownDescription": "Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private\nprojects, or \"discover\" to try to automatically find it.\n\nAny project which uses rust-analyzer with the rustcPrivate\ncrates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.\n\nThis option is not reloaded automatically; you must restart rust-analyzer for it to take effect.",
+ "markdownDescription": "Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private\nprojects, or \"discover\" to try to automatically find it if the `rustc-dev` component\nis installed.\n\nAny project which uses rust-analyzer with the rustcPrivate\ncrates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.\n\nThis option does not take effect until rust-analyzer is restarted.",
"default": null,
"type": [
"null",
"Search for all symbols kinds"
]
},
+ "rust-analyzer.workspace.symbol.search.limit": {
+ "markdownDescription": "Limits the number of items returned from a workspace symbol search (Defaults to 128).\nSome clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.\nOther clients requires all results upfront and might require a higher limit.",
+ "default": 128,
+ "type": "integer",
+ "minimum": 0
+ },
"$generated-end": {}
}
},
}
],
"semanticTokenModifiers": [
+ {
+ "id": "async",
+ "description": "Style for async functions and the `async` and `await` keywords"
+ },
{
"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": "consuming",
+ "description": "Style for locals that are being consumed when use in a function call"
+ },
{
"id": "controlFlow",
- "description": "Style for control flow keywords"
+ "description": "Style for control-flow related tokens, this includes the `?` operator"
},
{
- "id": "mutable",
+ "id": "definition",
"description": "Style for mutable bindings"
},
{
- "id": "unsafe",
- "description": "Style for unsafe operations"
+ "id": "injected",
+ "description": "Style for doc-string injected highlighting like rust source blocks in documentation"
},
{
- "id": "consuming",
- "description": "Style for non-Copy lvalues consumed by method/function call"
+ "id": "intraDocLink",
+ "description": "Style for intra doc links in doc-strings"
},
{
- "id": "callable",
- "description": "Style for variables/parameters that can be used in call expressions"
+ "id": "library",
+ "description": "Style for items that are defined outside of the current crate"
+ },
+ {
+ "id": "mutable",
+ "description": "Style for mutable locals and statics as well as functions taking `&mut self`"
+ },
+ {
+ "id": "public",
+ "description": "Style tems that are from the current crate and are `pub`"
+ },
+ {
+ "id": "reference",
+ "description": "Style for locals behind a reference and functions taking `self` by reference"
+ },
+ {
+ "id": "trait",
+ "description": "Style for associated trait items"
+ },
+ {
+ "id": "unsafe",
+ "description": "Style for unsafe operations, like unsafe function calls, as well as the `unsafe` token"
}
],
"semanticTokenScopes": [