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.expandMacro",
108 "title": "Expand macro recursively",
109 "category": "Rust Analyzer"
112 "command": "rust-analyzer.matchingBrace",
113 "title": "Find matching brace",
114 "category": "Rust Analyzer"
117 "command": "rust-analyzer.parentModule",
118 "title": "Locate parent module",
119 "category": "Rust Analyzer"
122 "command": "rust-analyzer.joinLines",
123 "title": "Join lines",
124 "category": "Rust Analyzer"
127 "command": "rust-analyzer.run",
129 "category": "Rust Analyzer"
132 "command": "rust-analyzer.debug",
134 "category": "Rust Analyzer"
137 "command": "rust-analyzer.newDebugConfig",
138 "title": "Generate launch configuration",
139 "category": "Rust Analyzer"
142 "command": "rust-analyzer.analyzerStatus",
144 "category": "Rust Analyzer"
147 "command": "rust-analyzer.memoryUsage",
148 "title": "Memory Usage (Clears Database)",
149 "category": "Rust Analyzer"
152 "command": "rust-analyzer.reloadWorkspace",
153 "title": "Reload workspace",
154 "category": "Rust Analyzer"
157 "command": "rust-analyzer.reload",
158 "title": "Restart server",
159 "category": "Rust Analyzer"
162 "command": "rust-analyzer.updateGithubToken",
163 "title": "Update Github API token",
164 "category": "Rust Analyzer"
167 "command": "rust-analyzer.onEnter",
168 "title": "Enhanced enter key",
169 "category": "Rust Analyzer"
172 "command": "rust-analyzer.ssr",
173 "title": "Structural Search Replace",
174 "category": "Rust Analyzer"
177 "command": "rust-analyzer.serverVersion",
178 "title": "Show RA Version",
179 "category": "Rust Analyzer"
182 "command": "rust-analyzer.toggleInlayHints",
183 "title": "Toggle inlay hints",
184 "category": "Rust Analyzer"
187 "command": "rust-analyzer.openDocs",
188 "title": "Open docs under cursor",
189 "category": "Rust Analyzer"
192 "command": "rust-analyzer.openCargoToml",
193 "title": "Open Cargo.toml",
194 "category": "Rust Analyzer"
199 "command": "rust-analyzer.parentModule",
200 "key": "ctrl+shift+u",
201 "when": "editorTextFocus && editorLangId == rust"
204 "command": "rust-analyzer.matchingBrace",
205 "key": "ctrl+shift+m",
206 "when": "editorTextFocus && editorLangId == rust"
209 "command": "rust-analyzer.joinLines",
210 "key": "ctrl+shift+j",
211 "when": "editorTextFocus && editorLangId == rust"
216 "title": "Rust Analyzer",
218 "rust-analyzer.cargoRunner": {
224 "description": "Custom cargo runner extension ID."
226 "rust-analyzer.runnableEnv": {
238 "description": "Runnable name mask"
242 "description": "Variables in form of { \"key\": \"value\"}"
249 "description": "Variables in form of { \"key\": \"value\"}"
253 "markdownDescription": "Environment variables passed to the runnable launched using `Test` or `Debug` lens or `rust-analyzer.run` command."
255 "rust-analyzer.inlayHints.enable": {
258 "description": "Whether to show inlay hints."
260 "rust-analyzer.updates.channel": {
267 "markdownEnumDescriptions": [
268 "`stable` updates are shipped weekly, they don't contain cutting-edge features from VSCode proposed APIs but have less bugs in general.",
269 "`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**."
271 "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."
273 "rust-analyzer.updates.askBeforeDownload": {
276 "description": "Whether to ask for permission before downloading any files from the Internet."
278 "rust-analyzer.serverPath": {
284 "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"
286 "rust-analyzer.trace.server": {
294 "enumDescriptions": [
300 "description": "Trace requests to the rust-analyzer (this is usually overly verbose and not recommended for regular users)."
302 "rust-analyzer.trace.extension": {
303 "description": "Enable logging of VS Code extensions itself.",
307 "rust-analyzer.debug.engine": {
311 "vadimcn.vscode-lldb",
315 "description": "Preferred debug engine.",
316 "markdownEnumDescriptions": [
317 "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).",
318 "Use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)",
319 "Use [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)"
322 "rust-analyzer.debug.sourceFileMap": {
324 "description": "Optional source file mappings passed to the debug engine.",
326 "/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"
329 "rust-analyzer.debug.openDebugPane": {
330 "markdownDescription": "Whether to open up the `Debug Panel` on debugging start.",
334 "rust-analyzer.debug.engineSettings": {
337 "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`"
339 "rust-analyzer.assist.importMergeBehaviour": {
340 "markdownDescription": "The strategy to use when inserting new imports or merging imports.",
348 "enumDescriptions": [
350 "Merge all layers of the import trees",
351 "Only merge the last layer of the import trees"
354 "rust-analyzer.assist.importPrefix": {
355 "markdownDescription": "The path structure for newly inserted paths to use.",
363 "enumDescriptions": [
364 "Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.",
365 "Prefix all import paths with `self` if they don't begin with `self`, `super`, `crate` or a crate name.",
366 "Force import paths to be absolute by always starting them with `crate` or the crate name they refer to."
369 "rust-analyzer.callInfo.full": {
370 "markdownDescription": "Show function name and docs in parameter hints.",
374 "rust-analyzer.cargo.autoreload": {
375 "markdownDescription": "Automatically refresh project info via `cargo metadata` on `Cargo.toml` changes.",
379 "rust-analyzer.cargo.allFeatures": {
380 "markdownDescription": "Activate all available features.",
384 "rust-analyzer.cargo.features": {
385 "markdownDescription": "List of features to activate.",
392 "rust-analyzer.cargo.loadOutDirsFromCheck": {
393 "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs.",
397 "rust-analyzer.cargo.noDefaultFeatures": {
398 "markdownDescription": "Do not activate the `default` feature.",
402 "rust-analyzer.cargo.target": {
403 "markdownDescription": "Compilation target (target triple).",
410 "rust-analyzer.cargo.noSysroot": {
411 "markdownDescription": "Internal config for debugging, disables loading of sysroot crates.",
415 "rust-analyzer.checkOnSave.enable": {
416 "markdownDescription": "Run specified `cargo check` command for diagnostics on save.",
420 "rust-analyzer.checkOnSave.allFeatures": {
421 "markdownDescription": "Check with all features (will be passed as `--all-features`). Defaults to `#rust-analyzer.cargo.allFeatures#`.",
428 "rust-analyzer.checkOnSave.allTargets": {
429 "markdownDescription": "Check all targets and tests (will be passed as `--all-targets`).",
433 "rust-analyzer.checkOnSave.command": {
434 "markdownDescription": "Cargo command to use for `cargo check`.",
438 "rust-analyzer.checkOnSave.noDefaultFeatures": {
439 "markdownDescription": "Do not activate the `default` feature.",
446 "rust-analyzer.checkOnSave.target": {
447 "markdownDescription": "Check for a specific target. Defaults to `#rust-analyzer.cargo.target#`.",
454 "rust-analyzer.checkOnSave.extraArgs": {
455 "markdownDescription": "Extra arguments for `cargo check`.",
462 "rust-analyzer.checkOnSave.features": {
463 "markdownDescription": "List of features to activate. Defaults to `#rust-analyzer.cargo.features#`.",
473 "rust-analyzer.checkOnSave.overrideCommand": {
474 "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message-format=json` or similar option.",
484 "rust-analyzer.completion.addCallArgumentSnippets": {
485 "markdownDescription": "Whether to add argument snippets when completing functions.",
489 "rust-analyzer.completion.addCallParenthesis": {
490 "markdownDescription": "Whether to add parenthesis when completing functions.",
494 "rust-analyzer.completion.postfix.enable": {
495 "markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc.",
499 "rust-analyzer.completion.autoimport.enable": {
500 "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.",
504 "rust-analyzer.diagnostics.enable": {
505 "markdownDescription": "Whether to show native rust-analyzer diagnostics.",
509 "rust-analyzer.diagnostics.enableExperimental": {
510 "markdownDescription": "Whether to show experimental rust-analyzer diagnostics that might have more false positives than usual.",
514 "rust-analyzer.diagnostics.disabled": {
515 "markdownDescription": "List of rust-analyzer diagnostics to disable.",
523 "rust-analyzer.diagnostics.warningsAsHint": {
524 "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`.",
531 "rust-analyzer.diagnostics.warningsAsInfo": {
532 "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`.",
539 "rust-analyzer.files.watcher": {
540 "markdownDescription": "Controls file watching implementation.",
544 "rust-analyzer.hoverActions.debug": {
545 "markdownDescription": "Whether to show `Debug` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
549 "rust-analyzer.hoverActions.enable": {
550 "markdownDescription": "Whether to show HoverActions in Rust files.",
554 "rust-analyzer.hoverActions.gotoTypeDef": {
555 "markdownDescription": "Whether to show `Go to Type Definition` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
559 "rust-analyzer.hoverActions.implementations": {
560 "markdownDescription": "Whether to show `Implementations` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
564 "rust-analyzer.hoverActions.run": {
565 "markdownDescription": "Whether to show `Run` action. Only applies when `#rust-analyzer.hoverActions.enable#` is set.",
569 "rust-analyzer.hoverActions.linksInHover": {
570 "markdownDescription": "Use markdown syntax for links in hover.",
574 "rust-analyzer.inlayHints.chainingHints": {
575 "markdownDescription": "Whether to show inlay type hints for method chains.",
579 "rust-analyzer.inlayHints.maxLength": {
580 "markdownDescription": "Maximum length for inlay hints. Default is unlimited.",
588 "rust-analyzer.inlayHints.parameterHints": {
589 "markdownDescription": "Whether to show function parameter name inlay hints at the call site.",
593 "rust-analyzer.inlayHints.typeHints": {
594 "markdownDescription": "Whether to show inlay type hints for variables.",
598 "rust-analyzer.lens.debug": {
599 "markdownDescription": "Whether to show `Debug` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
603 "rust-analyzer.lens.enable": {
604 "markdownDescription": "Whether to show CodeLens in Rust files.",
608 "rust-analyzer.lens.implementations": {
609 "markdownDescription": "Whether to show `Implementations` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
613 "rust-analyzer.lens.run": {
614 "markdownDescription": "Whether to show `Run` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
618 "rust-analyzer.lens.methodReferences": {
619 "markdownDescription": "Whether to show `Method References` lens. Only applies when `#rust-analyzer.lens.enable#` is set.",
623 "rust-analyzer.linkedProjects": {
624 "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.",
634 "rust-analyzer.lruCapacity": {
635 "markdownDescription": "Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.",
643 "rust-analyzer.notifications.cargoTomlNotFound": {
644 "markdownDescription": "Whether to show `can't find Cargo.toml` error message.",
648 "rust-analyzer.procMacro.enable": {
649 "markdownDescription": "Enable Proc macro support, `#rust-analyzer.cargo.loadOutDirsFromCheck#` must be enabled.",
653 "rust-analyzer.runnables.overrideCargo": {
654 "markdownDescription": "Command to be executed instead of 'cargo' for runnables.",
661 "rust-analyzer.runnables.cargoExtraArgs": {
662 "markdownDescription": "Additional arguments to be passed to cargo for runnables such as tests or binaries.\\nFor example, it may be `--release`.",
669 "rust-analyzer.rustcSource": {
670 "markdownDescription": "Path to the rust compiler sources, for usage in rustc_private projects.",
677 "rust-analyzer.rustfmt.extraArgs": {
678 "markdownDescription": "Additional arguments to `rustfmt`.",
685 "rust-analyzer.rustfmt.overrideCommand": {
686 "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for formatting.",
703 "regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
709 "regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
717 "name": "rustc-json",
720 "regexp": "^.*\"message\":{\"message\":\"([^\"]*).*?\"file_name\":\"([^\"]+).*?\"line_start\":(\\d+).*?\"line_end\":(\\d+).*?\"column_start\":(\\d+).*?\"column_end\":(\\d+).*}$",
733 "id": "ra_syntax_tree",
747 "configuration": "language-configuration.json"
752 "language": "ra_syntax_tree",
753 "scopeName": "source.ra_syntax_tree",
754 "path": "ra_syntax_tree.tmGrammar.json"
769 "name": "rustc-json",
776 "pattern": "$rustc-json"
779 "name": "rustc-watch",
787 "beginsPattern": "^\\[Running\\b",
788 "endsPattern": "^\\[Finished running\\b"
795 "id": "rust_analyzer.inlayHints.foreground",
796 "description": "Foreground color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.foreground.* configurations)",
800 "highContrast": "#BEBEBE"
804 "id": "rust_analyzer.inlayHints.background",
805 "description": "Background color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.background.* configurations)",
808 "light": "#11223300",
809 "highContrast": "#11223300"
813 "id": "rust_analyzer.inlayHints.foreground.typeHints",
814 "description": "Foreground color of inlay type hints for variables (overrides rust_analyzer.inlayHints.foreground)",
816 "dark": "rust_analyzer.inlayHints.foreground",
817 "light": "rust_analyzer.inlayHints.foreground",
818 "highContrast": "rust_analyzer.inlayHints.foreground"
822 "id": "rust_analyzer.inlayHints.foreground.chainingHints",
823 "description": "Foreground color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.foreground)",
825 "dark": "rust_analyzer.inlayHints.foreground",
826 "light": "rust_analyzer.inlayHints.foreground",
827 "highContrast": "rust_analyzer.inlayHints.foreground"
831 "id": "rust_analyzer.inlayHints.foreground.parameterHints",
832 "description": "Foreground color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.foreground)",
834 "dark": "rust_analyzer.inlayHints.foreground",
835 "light": "rust_analyzer.inlayHints.foreground",
836 "highContrast": "rust_analyzer.inlayHints.foreground"
840 "id": "rust_analyzer.inlayHints.background.typeHints",
841 "description": "Background color of inlay type hints for variables (overrides rust_analyzer.inlayHints.background)",
843 "dark": "rust_analyzer.inlayHints.background",
844 "light": "rust_analyzer.inlayHints.background",
845 "highContrast": "rust_analyzer.inlayHints.background"
849 "id": "rust_analyzer.inlayHints.background.chainingHints",
850 "description": "Background color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.background)",
852 "dark": "rust_analyzer.inlayHints.background",
853 "light": "rust_analyzer.inlayHints.background",
854 "highContrast": "rust_analyzer.inlayHints.background"
858 "id": "rust_analyzer.inlayHints.background.parameterHints",
859 "description": "Background color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.background)",
861 "dark": "rust_analyzer.inlayHints.background",
862 "light": "rust_analyzer.inlayHints.background",
863 "highContrast": "rust_analyzer.inlayHints.background"
867 "id": "rust_analyzer.syntaxTreeBorder",
868 "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)",
872 "highContrast": "#b700ff"
876 "semanticTokenTypes": [
879 "description": "Style for attributes"
883 "description": "Style for boolean literals",
884 "superType": "keyword"
888 "description": "Style for builtin types",
893 "description": "Style for lifetimes"
897 "description": "Style for the self keyword",
898 "superType": "keyword"
902 "description": "Style for type aliases",
907 "description": "Style for C-style untagged unions",
911 "id": "unresolvedReference",
912 "description": "Style for names which can not be resolved due to compilation errors"
915 "id": "formatSpecifier",
916 "description": "Style for {} placeholders in format strings"
919 "semanticTokenModifiers": [
922 "description": "Style for elements within attributes"
926 "description": "Style for compile-time constants"
930 "description": "Style for control flow keywords"
934 "description": "Style for mutable bindings"
938 "description": "Style for unsafe operations"
942 "description": "Style for non-Copy lvalues consumed by method/function call"
946 "description": "Style for variables/parameters that can be used in call expressions"
949 "semanticTokenScopes": [
954 "meta.attribute.rust"
956 "function.attribute": [
957 "entity.name.function.attribute.rust"
960 "constant.language.boolean.rust"
963 "support.type.primitive.rust"
966 "storage.modifier.lifetime.rust"
969 "entity.name.type.typeAlias.rust"
972 "entity.name.type.union.rust"
975 "entity.name.type.struct.rust"
980 "keyword.controlFlow": [
981 "keyword.control.rust"
983 "variable.constant": [
984 "variable.other.constant.rust"
987 "punctuation.section.embedded.rust"
998 "command": "rust-analyzer.syntaxTree",
999 "when": "inRustProject"
1002 "command": "rust-analyzer.expandMacro",
1003 "when": "inRustProject"
1006 "command": "rust-analyzer.matchingBrace",
1007 "when": "inRustProject"
1010 "command": "rust-analyzer.parentModule",
1011 "when": "inRustProject"
1014 "command": "rust-analyzer.joinLines",
1015 "when": "inRustProject"
1018 "command": "rust-analyzer.run",
1019 "when": "inRustProject"
1022 "command": "rust-analyzer.debug",
1023 "when": "inRustProject"
1026 "command": "rust-analyzer.newDebugConfig",
1027 "when": "inRustProject"
1030 "command": "rust-analyzer.analyzerStatus",
1031 "when": "inRustProject"
1034 "command": "rust-analyzer.memoryUsage",
1035 "when": "inRustProject"
1038 "command": "rust-analyzer.reloadWorkspace",
1039 "when": "inRustProject"
1042 "command": "rust-analyzer.reload",
1043 "when": "inRustProject"
1046 "command": "rust-analyzer.updateGithubToken",
1047 "when": "inRustProject"
1050 "command": "rust-analyzer.onEnter",
1051 "when": "inRustProject"
1054 "command": "rust-analyzer.ssr",
1055 "when": "inRustProject"
1058 "command": "rust-analyzer.serverVersion",
1059 "when": "inRustProject"
1062 "command": "rust-analyzer.toggleInlayHints",
1063 "when": "inRustProject"
1066 "command": "rust-analyzer.openDocs",
1067 "when": "inRustProject"
1070 "command": "rust-analyzer.openCargoToml",
1071 "when": "inRustProject"