2 "name": "rust-analyzer",
3 "displayName": "rust-analyzer",
4 "description": "An alternative rust language server to the RLS",
8 "version": "0.4.0-dev",
10 "publisher": "matklad",
12 "url": "https://github.com/rust-analyzer/rust-analyzer.git",
15 "homepage": "https://rust-analyzer.github.io/",
16 "license": "MIT OR Apache-2.0",
21 "Programming Languages"
26 "enableProposedApi": true,
28 "vscode:prepublish": "tsc && rollup -c",
29 "package": "vsce package -o rust-analyzer.vsix",
31 "watch": "tsc --watch",
32 "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",
33 "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix",
34 "pretest": "npm run build",
35 "test": "node ./out/tests/runTests.js"
38 "node-fetch": "^2.6.1",
39 "vscode-languageclient": "7.0.0"
42 "@rollup/plugin-commonjs": "^17.0.0",
43 "@rollup/plugin-node-resolve": "^11.0.0",
44 "@types/glob": "^7.1.3",
45 "@types/mocha": "^8.0.4",
46 "@types/node": "~12.12.6",
47 "@types/node-fetch": "^2.5.7",
48 "@types/vscode": "^1.52.0",
49 "@typescript-eslint/eslint-plugin": "^4.9.0",
50 "@typescript-eslint/parser": "^4.9.0",
56 "typescript": "^4.1.2",
57 "typescript-formatter": "^7.2.2",
59 "vscode-test": "^1.4.1"
63 "onCommand:rust-analyzer.analyzerStatus",
64 "onCommand:rust-analyzer.memoryUsage",
65 "onCommand:rust-analyzer.reloadWorkspace",
66 "workspaceContains:**/Cargo.toml"
68 "main": "./out/src/main",
91 "patternProperties": {
102 "command": "rust-analyzer.syntaxTree",
103 "title": "Show Syntax Tree",
104 "category": "Rust Analyzer"
107 "command": "rust-analyzer.viewHir",
109 "category": "Rust Analyzer"
112 "command": "rust-analyzer.expandMacro",
113 "title": "Expand macro recursively",
114 "category": "Rust Analyzer"
117 "command": "rust-analyzer.matchingBrace",
118 "title": "Find matching brace",
119 "category": "Rust Analyzer"
122 "command": "rust-analyzer.parentModule",
123 "title": "Locate parent module",
124 "category": "Rust Analyzer"
127 "command": "rust-analyzer.joinLines",
128 "title": "Join lines",
129 "category": "Rust Analyzer"
132 "command": "rust-analyzer.run",
134 "category": "Rust Analyzer"
137 "command": "rust-analyzer.debug",
139 "category": "Rust Analyzer"
142 "command": "rust-analyzer.newDebugConfig",
143 "title": "Generate launch configuration",
144 "category": "Rust Analyzer"
147 "command": "rust-analyzer.analyzerStatus",
149 "category": "Rust Analyzer"
152 "command": "rust-analyzer.memoryUsage",
153 "title": "Memory Usage (Clears Database)",
154 "category": "Rust Analyzer"
157 "command": "rust-analyzer.reloadWorkspace",
158 "title": "Reload workspace",
159 "category": "Rust Analyzer"
162 "command": "rust-analyzer.reload",
163 "title": "Restart server",
164 "category": "Rust Analyzer"
167 "command": "rust-analyzer.updateGithubToken",
168 "title": "Update Github API token",
169 "category": "Rust Analyzer"
172 "command": "rust-analyzer.onEnter",
173 "title": "Enhanced enter key",
174 "category": "Rust Analyzer"
177 "command": "rust-analyzer.ssr",
178 "title": "Structural Search Replace",
179 "category": "Rust Analyzer"
182 "command": "rust-analyzer.serverVersion",
183 "title": "Show RA Version",
184 "category": "Rust Analyzer"
187 "command": "rust-analyzer.toggleInlayHints",
188 "title": "Toggle inlay hints",
189 "category": "Rust Analyzer"
192 "command": "rust-analyzer.openDocs",
193 "title": "Open docs under cursor",
194 "category": "Rust Analyzer"
197 "command": "rust-analyzer.openCargoToml",
198 "title": "Open Cargo.toml",
199 "category": "Rust Analyzer"
204 "command": "rust-analyzer.parentModule",
205 "key": "ctrl+shift+u",
206 "when": "editorTextFocus && editorLangId == rust"
209 "command": "rust-analyzer.matchingBrace",
210 "key": "ctrl+shift+m",
211 "when": "editorTextFocus && editorLangId == rust"
214 "command": "rust-analyzer.joinLines",
215 "key": "ctrl+shift+j",
216 "when": "editorTextFocus && editorLangId == rust"
221 "title": "Rust Analyzer",
223 "rust-analyzer.cargoRunner": {
229 "description": "Custom cargo runner extension ID."
231 "rust-analyzer.runnableEnv": {
243 "description": "Runnable name mask"
247 "description": "Variables in form of { \"key\": \"value\"}"
254 "description": "Variables in form of { \"key\": \"value\"}"
258 "markdownDescription": "Environment variables passed to the runnable launched using `Test` or `Debug` lens or `rust-analyzer.run` command."
260 "rust-analyzer.inlayHints.enable": {
263 "description": "Whether to show inlay hints."
265 "rust-analyzer.updates.channel": {
272 "markdownEnumDescriptions": [
273 "`stable` updates are shipped weekly, they don't contain cutting-edge features from VSCode proposed APIs but have less bugs in general.",
274 "`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**."
276 "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."
278 "rust-analyzer.updates.askBeforeDownload": {
281 "description": "Whether to ask for permission before downloading any files from the Internet."
283 "rust-analyzer.server.path": {
289 "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"
291 "rust-analyzer.server.extraEnv": {
297 "markdownDescription": "Extra environment variables that will be passed to the rust-analyzer executable. Useful for passing e.g. `RA_LOG` for debugging."
299 "rust-analyzer.trace.server": {
307 "enumDescriptions": [
313 "description": "Trace requests to the rust-analyzer (this is usually overly verbose and not recommended for regular users)."
315 "rust-analyzer.trace.extension": {
316 "description": "Enable logging of VS Code extensions itself.",
320 "rust-analyzer.debug.engine": {
324 "vadimcn.vscode-lldb",
328 "description": "Preferred debug engine.",
329 "markdownEnumDescriptions": [
330 "First try to use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb), if it's not installed try to use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).",
331 "Use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)",
332 "Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)"
335 "rust-analyzer.debug.sourceFileMap": {
337 "description": "Optional source file mappings passed to the debug engine.",
339 "/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"
342 "rust-analyzer.debug.openDebugPane": {
343 "markdownDescription": "Whether to open up the `Debug Panel` on debugging start.",
347 "rust-analyzer.debug.engineSettings": {
350 "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`"
352 "$generated-start": false,
353 "rust-analyzer.assist.importMergeBehavior": {
354 "markdownDescription": "The strategy to use when inserting new imports or merging imports.",
362 "enumDescriptions": [
364 "Merge all layers of the import trees",
365 "Only merge the last layer of the import trees"
368 "rust-analyzer.assist.importPrefix": {
369 "markdownDescription": "The path structure for newly inserted paths to use.",
377 "enumDescriptions": [
378 "Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.",
379 "Prefix all import paths with `self` if they don't begin with `self`, `super`, `crate` or a crate name.",
380 "Force import paths to be absolute by always starting them with `crate` or the crate name they refer to."
383 "rust-analyzer.callInfo.full": {
384 "markdownDescription": "Show function name and docs in parameter hints.",
388 "rust-analyzer.cargo.autoreload": {
389 "markdownDescription": "Automatically refresh project info via `cargo metadata` on `Cargo.toml` changes.",
393 "rust-analyzer.cargo.allFeatures": {
394 "markdownDescription": "Activate all available features (`--all-features`).",
398 "rust-analyzer.cargo.features": {
399 "markdownDescription": "List of features to activate.",
406 "rust-analyzer.cargo.loadOutDirsFromCheck": {
407 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs.",
411 "rust-analyzer.cargo.noDefaultFeatures": {
412 "markdownDescription": "Do not activate the `default` feature.",
416 "rust-analyzer.cargo.target": {
417 "markdownDescription": "Compilation target (target triple).",
424 "rust-analyzer.cargo.noSysroot": {
425 "markdownDescription": "Internal config for debugging, disables loading of sysroot crates.",
429 "rust-analyzer.checkOnSave.enable": {
430 "markdownDescription": "Run specified `cargo check` command for diagnostics on save.",
434 "rust-analyzer.checkOnSave.allFeatures": {
435 "markdownDescription": "Check with all features (`--all-features`). Defaults to `#rust-analyzer.cargo.allFeatures#`.",
442 "rust-analyzer.checkOnSave.allTargets": {
443 "markdownDescription": "Check all targets and tests (`--all-targets`).",
447 "rust-analyzer.checkOnSave.command": {
448 "markdownDescription": "Cargo command to use for `cargo check`.",
452 "rust-analyzer.checkOnSave.noDefaultFeatures": {
453 "markdownDescription": "Do not activate the `default` feature.",
460 "rust-analyzer.checkOnSave.target": {
461 "markdownDescription": "Check for a specific target. Defaults to `#rust-analyzer.cargo.target#`.",
468 "rust-analyzer.checkOnSave.extraArgs": {
469 "markdownDescription": "Extra arguments for `cargo check`.",
476 "rust-analyzer.checkOnSave.features": {
477 "markdownDescription": "List of features to activate. Defaults to `#rust-analyzer.cargo.features#`.",
487 "rust-analyzer.checkOnSave.overrideCommand": {
488 "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message-format=json` or similar option.",
498 "rust-analyzer.completion.addCallArgumentSnippets": {
499 "markdownDescription": "Whether to add argument snippets when completing functions.",
503 "rust-analyzer.completion.addCallParenthesis": {
504 "markdownDescription": "Whether to add parenthesis when completing functions.",
508 "rust-analyzer.completion.postfix.enable": {
509 "markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc.",
513 "rust-analyzer.completion.autoimport.enable": {
514 "markdownDescription": "Toggles the additional completions that automatically add imports when completed. Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.",
518 "rust-analyzer.diagnostics.enable": {
519 "markdownDescription": "Whether to show native rust-analyzer diagnostics.",
523 "rust-analyzer.diagnostics.enableExperimental": {
524 "markdownDescription": "Whether to show experimental rust-analyzer diagnostics that might have more false positives than usual.",
528 "rust-analyzer.diagnostics.disabled": {
529 "markdownDescription": "List of rust-analyzer diagnostics to disable.",
537 "rust-analyzer.diagnostics.warningsAsHint": {
538 "markdownDescription": "List of warnings that should be displayed with info severity.\\n\\nThe warnings will be indicated by a blue squiggly underline in code and a blue icon in the `Problems Panel`.",
545 "rust-analyzer.diagnostics.warningsAsInfo": {
546 "markdownDescription": "List of warnings that should be displayed with hint severity.\\n\\nThe warnings will be indicated by faded text or three dots in code and will not show up in the `Problems Panel`.",
553 "rust-analyzer.files.watcher": {
554 "markdownDescription": "Controls file watching implementation.",
558 "rust-analyzer.files.excludeDirs": {
559 "markdownDescription": "These directories will be ignored by rust-analyzer.",
566 "rust-analyzer.hoverActions.debug": {
567 "markdownDescription": "Whether to show `Debug` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
571 "rust-analyzer.hoverActions.enable": {
572 "markdownDescription": "Whether to show HoverActions in Rust files.",
576 "rust-analyzer.hoverActions.gotoTypeDef": {
577 "markdownDescription": "Whether to show `Go to Type Definition` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
581 "rust-analyzer.hoverActions.implementations": {
582 "markdownDescription": "Whether to show `Implementations` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
586 "rust-analyzer.hoverActions.run": {
587 "markdownDescription": "Whether to show `Run` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
591 "rust-analyzer.hoverActions.linksInHover": {
592 "markdownDescription": "Use markdown syntax for links in hover.",
596 "rust-analyzer.inlayHints.chainingHints": {
597 "markdownDescription": "Whether to show inlay type hints for method chains.",
601 "rust-analyzer.inlayHints.maxLength": {
602 "markdownDescription": "Maximum length for inlay hints. Default is unlimited.",
610 "rust-analyzer.inlayHints.parameterHints": {
611 "markdownDescription": "Whether to show function parameter name inlay hints at the call site.",
615 "rust-analyzer.inlayHints.typeHints": {
616 "markdownDescription": "Whether to show inlay type hints for variables.",
620 "rust-analyzer.lens.debug": {
621 "markdownDescription": "Whether to show `Debug` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
625 "rust-analyzer.lens.enable": {
626 "markdownDescription": "Whether to show CodeLens in Rust files.",
630 "rust-analyzer.lens.implementations": {
631 "markdownDescription": "Whether to show `Implementations` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
635 "rust-analyzer.lens.run": {
636 "markdownDescription": "Whether to show `Run` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
640 "rust-analyzer.lens.methodReferences": {
641 "markdownDescription": "Whether to show `Method References` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
645 "rust-analyzer.lens.references": {
646 "markdownDescription": "Whether to show `References` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
650 "rust-analyzer.linkedProjects": {
651 "markdownDescription": "Disable project auto-discovery in favor of explicitly specified set of projects.\\n\\nElements must be paths pointing to `Cargo.toml`, `rust-project.json`, or JSON objects in `rust-project.json` format.",
661 "rust-analyzer.lruCapacity": {
662 "markdownDescription": "Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.",
670 "rust-analyzer.notifications.cargoTomlNotFound": {
671 "markdownDescription": "Whether to show `can't find Cargo.toml` error message.",
675 "rust-analyzer.procMacro.enable": {
676 "markdownDescription": "Enable Proc macro support, `#rust-analyzer.cargo.loadOutDirsFromCheck#` must be enabled.",
680 "rust-analyzer.procMacro.server": {
681 "markdownDescription": "Internal config, path to proc-macro server executable (typically, this is rust-analyzer itself, but we override this in tests).",
688 "rust-analyzer.runnables.overrideCargo": {
689 "markdownDescription": "Command to be executed instead of 'cargo' for runnables.",
696 "rust-analyzer.runnables.cargoExtraArgs": {
697 "markdownDescription": "Additional arguments to be passed to cargo for runnables such as tests or binaries.\\nFor example, it may be `--release`.",
704 "rust-analyzer.rustcSource": {
705 "markdownDescription": "Path to the rust compiler sources, for usage in rustc_private projects.",
712 "rust-analyzer.rustfmt.extraArgs": {
713 "markdownDescription": "Additional arguments to `rustfmt`.",
720 "rust-analyzer.rustfmt.overrideCommand": {
721 "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for formatting.",
731 "$generated-end": false
739 "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
745 "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
753 "name": "rustc-json",
756 "regexp": "^.*\"message\":{\"message\":\"([^\"]*).*?\"file_name\":\"([^\"]+).*?\"line_start\":(\\d+).*?\"line_end\":(\\d+).*?\"column_start\":(\\d+).*?\"column_end\":(\\d+).*}$",
769 "id": "ra_syntax_tree",
783 "configuration": "language-configuration.json"
788 "language": "ra_syntax_tree",
789 "scopeName": "source.ra_syntax_tree",
790 "path": "ra_syntax_tree.tmGrammar.json"
805 "name": "rustc-json",
812 "pattern": "$rustc-json"
815 "name": "rustc-watch",
823 "beginsPattern": "^\\[Running\\b",
824 "endsPattern": "^\\[Finished running\\b"
831 "id": "rust_analyzer.inlayHints.foreground",
832 "description": "Foreground color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.foreground.* configurations)",
836 "highContrast": "#BEBEBE"
840 "id": "rust_analyzer.inlayHints.background",
841 "description": "Background color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.background.* configurations)",
844 "light": "#11223300",
845 "highContrast": "#11223300"
849 "id": "rust_analyzer.inlayHints.foreground.typeHints",
850 "description": "Foreground color of inlay type hints for variables (overrides rust_analyzer.inlayHints.foreground)",
852 "dark": "rust_analyzer.inlayHints.foreground",
853 "light": "rust_analyzer.inlayHints.foreground",
854 "highContrast": "rust_analyzer.inlayHints.foreground"
858 "id": "rust_analyzer.inlayHints.foreground.chainingHints",
859 "description": "Foreground color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.foreground)",
861 "dark": "rust_analyzer.inlayHints.foreground",
862 "light": "rust_analyzer.inlayHints.foreground",
863 "highContrast": "rust_analyzer.inlayHints.foreground"
867 "id": "rust_analyzer.inlayHints.foreground.parameterHints",
868 "description": "Foreground color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.foreground)",
870 "dark": "rust_analyzer.inlayHints.foreground",
871 "light": "rust_analyzer.inlayHints.foreground",
872 "highContrast": "rust_analyzer.inlayHints.foreground"
876 "id": "rust_analyzer.inlayHints.background.typeHints",
877 "description": "Background color of inlay type hints for variables (overrides rust_analyzer.inlayHints.background)",
879 "dark": "rust_analyzer.inlayHints.background",
880 "light": "rust_analyzer.inlayHints.background",
881 "highContrast": "rust_analyzer.inlayHints.background"
885 "id": "rust_analyzer.inlayHints.background.chainingHints",
886 "description": "Background color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.background)",
888 "dark": "rust_analyzer.inlayHints.background",
889 "light": "rust_analyzer.inlayHints.background",
890 "highContrast": "rust_analyzer.inlayHints.background"
894 "id": "rust_analyzer.inlayHints.background.parameterHints",
895 "description": "Background color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.background)",
897 "dark": "rust_analyzer.inlayHints.background",
898 "light": "rust_analyzer.inlayHints.background",
899 "highContrast": "rust_analyzer.inlayHints.background"
903 "id": "rust_analyzer.syntaxTreeBorder",
904 "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)",
908 "highContrast": "#b700ff"
912 "semanticTokenTypes": [
915 "description": "Style for attributes"
919 "description": "Style for boolean literals",
920 "superType": "keyword"
924 "description": "Style for builtin types",
929 "description": "Style for lifetimes"
933 "description": "Style for the self keyword",
934 "superType": "keyword"
938 "description": "Style for type aliases",
943 "description": "Style for C-style untagged unions",
947 "id": "unresolvedReference",
948 "description": "Style for names which can not be resolved due to compilation errors"
951 "id": "formatSpecifier",
952 "description": "Style for {} placeholders in format strings"
955 "semanticTokenModifiers": [
958 "description": "Style for elements within attributes"
962 "description": "Style for compile-time constants"
966 "description": "Style for control flow keywords"
970 "description": "Style for mutable bindings"
974 "description": "Style for unsafe operations"
978 "description": "Style for non-Copy lvalues consumed by method/function call"
982 "description": "Style for variables/parameters that can be used in call expressions"
985 "semanticTokenScopes": [
990 "meta.attribute.rust"
992 "function.attribute": [
993 "entity.name.function.attribute.rust"
996 "constant.language.boolean.rust"
999 "support.type.primitive.rust"
1002 "storage.modifier.lifetime.rust"
1005 "entity.name.type.typeAlias.rust"
1008 "entity.name.type.union.rust"
1011 "entity.name.type.struct.rust"
1014 "keyword.other.rust"
1016 "keyword.controlFlow": [
1017 "keyword.control.rust"
1019 "variable.constant": [
1020 "variable.other.constant.rust"
1022 "formatSpecifier": [
1023 "punctuation.section.embedded.rust"
1034 "command": "rust-analyzer.syntaxTree",
1035 "when": "inRustProject"
1038 "command": "rust-analyzer.viewHir",
1039 "when": "inRustProject"
1042 "command": "rust-analyzer.expandMacro",
1043 "when": "inRustProject"
1046 "command": "rust-analyzer.matchingBrace",
1047 "when": "inRustProject"
1050 "command": "rust-analyzer.parentModule",
1051 "when": "inRustProject"
1054 "command": "rust-analyzer.joinLines",
1055 "when": "inRustProject"
1058 "command": "rust-analyzer.run",
1059 "when": "inRustProject"
1062 "command": "rust-analyzer.debug",
1063 "when": "inRustProject"
1066 "command": "rust-analyzer.newDebugConfig",
1067 "when": "inRustProject"
1070 "command": "rust-analyzer.analyzerStatus",
1071 "when": "inRustProject"
1074 "command": "rust-analyzer.memoryUsage",
1075 "when": "inRustProject"
1078 "command": "rust-analyzer.reloadWorkspace",
1079 "when": "inRustProject"
1082 "command": "rust-analyzer.reload",
1083 "when": "inRustProject"
1086 "command": "rust-analyzer.updateGithubToken",
1087 "when": "inRustProject"
1090 "command": "rust-analyzer.onEnter",
1091 "when": "inRustProject"
1094 "command": "rust-analyzer.ssr",
1095 "when": "inRustProject"
1098 "command": "rust-analyzer.serverVersion",
1099 "when": "inRustProject"
1102 "command": "rust-analyzer.toggleInlayHints",
1103 "when": "inRustProject"
1106 "command": "rust-analyzer.openDocs",
1107 "when": "inRustProject"
1110 "command": "rust-analyzer.openCargoToml",
1111 "when": "inRustProject"