2021-12-31 15:11:17 +00:00
|
|
|
[[rust-analyzer.assist.exprFillDefault]]rust-analyzer.assist.exprFillDefault (default: `"todo"`)::
|
|
|
|
+
|
|
|
|
--
|
2022-01-07 14:01:37 +00:00
|
|
|
Placeholder for missing expressions in assists.
|
2021-12-31 15:11:17 +00:00
|
|
|
--
|
2021-05-18 18:21:47 +00:00
|
|
|
[[rust-analyzer.assist.importGranularity]]rust-analyzer.assist.importGranularity (default: `"crate"`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-05-18 18:21:47 +00:00
|
|
|
How imports should be grouped into use statements.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.assist.importEnforceGranularity]]rust-analyzer.assist.importEnforceGranularity (default: `false`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.assist.importPrefix]]rust-analyzer.assist.importPrefix (default: `"plain"`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
The path structure for newly inserted paths to use.
|
|
|
|
--
|
2021-03-06 11:02:26 +00:00
|
|
|
[[rust-analyzer.assist.importGroup]]rust-analyzer.assist.importGroup (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-09-24 13:53:11 +00:00
|
|
|
Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-import[following order]. Groups are separated by newlines.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-06-18 21:11:56 +00:00
|
|
|
[[rust-analyzer.assist.allowMergingIntoGlobImports]]rust-analyzer.assist.allowMergingIntoGlobImports (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
|
|
|
|
--
|
2021-11-19 15:56:46 +00:00
|
|
|
[[rust-analyzer.cache.warmup]]rust-analyzer.cache.warmup (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Warm up caches on project load.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.callInfo.full]]rust-analyzer.callInfo.full (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Show function name and docs in parameter hints.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.cargo.autoreload]]rust-analyzer.cargo.autoreload (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Automatically refresh project info via `cargo metadata` on
|
|
|
|
`Cargo.toml` changes.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.cargo.allFeatures]]rust-analyzer.cargo.allFeatures (default: `false`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Activate all available features (`--all-features`).
|
|
|
|
--
|
2021-06-14 04:41:46 +00:00
|
|
|
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Unsets `#[cfg(test)]` for the specified crates.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
List of features to activate.
|
|
|
|
--
|
2021-03-08 11:52:16 +00:00
|
|
|
[[rust-analyzer.cargo.runBuildScripts]]rust-analyzer.cargo.runBuildScripts (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Run build scripts (`build.rs`) for more precise code analysis.
|
|
|
|
--
|
2021-04-12 08:04:36 +00:00
|
|
|
[[rust-analyzer.cargo.useRustcWrapperForBuildScripts]]rust-analyzer.cargo.useRustcWrapperForBuildScripts (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
|
|
|
|
avoid compiling unnecessary things.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.cargo.noDefaultFeatures]]rust-analyzer.cargo.noDefaultFeatures (default: `false`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Do not activate the `default` feature.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.cargo.target]]rust-analyzer.cargo.target (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Compilation target (target triple).
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.cargo.noSysroot]]rust-analyzer.cargo.noSysroot (default: `false`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Internal config for debugging, disables loading of sysroot crates.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.enable]]rust-analyzer.checkOnSave.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Run specified `cargo check` command for diagnostics on save.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.allFeatures]]rust-analyzer.checkOnSave.allFeatures (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Check with all features (`--all-features`).
|
|
|
|
Defaults to `#rust-analyzer.cargo.allFeatures#`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.allTargets]]rust-analyzer.checkOnSave.allTargets (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Check all targets and tests (`--all-targets`).
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.command]]rust-analyzer.checkOnSave.command (default: `"check"`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Cargo command to use for `cargo check`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.noDefaultFeatures]]rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Do not activate the `default` feature.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Check for a specific target. Defaults to
|
|
|
|
`#rust-analyzer.cargo.target#`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.extraArgs]]rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Extra arguments for `cargo check`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.features]]rust-analyzer.checkOnSave.features (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
List of features to activate. Defaults to
|
|
|
|
`#rust-analyzer.cargo.features#`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.checkOnSave.overrideCommand]]rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Advanced option, fully override the command rust-analyzer uses for
|
|
|
|
checking. The command should include `--message-format=json` or
|
|
|
|
similar option.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.completion.addCallArgumentSnippets]]rust-analyzer.completion.addCallArgumentSnippets (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to add argument snippets when completing functions.
|
2021-06-02 20:10:09 +00:00
|
|
|
Only applies when `#rust-analyzer.completion.addCallParenthesis#` is set.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.completion.addCallParenthesis]]rust-analyzer.completion.addCallParenthesis (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to add parenthesis when completing functions.
|
|
|
|
--
|
2022-01-11 04:47:54 +00:00
|
|
|
[[rust-analyzer.completion.snippets]]rust-analyzer.completion.snippets::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Default:
|
|
|
|
----
|
|
|
|
{
|
2021-10-12 10:14:24 +00:00
|
|
|
"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"
|
|
|
|
}
|
2022-01-11 04:47:54 +00:00
|
|
|
}
|
|
|
|
----
|
2021-10-04 19:47:02 +00:00
|
|
|
Custom completion snippets.
|
2022-01-11 04:47:54 +00:00
|
|
|
|
2021-10-04 19:47:02 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.completion.postfix.enable]]rust-analyzer.completion.postfix.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.completion.autoimport.enable]]rust-analyzer.completion.autoimport.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
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.
|
|
|
|
--
|
2021-05-30 14:41:33 +00:00
|
|
|
[[rust-analyzer.completion.autoself.enable]]rust-analyzer.completion.autoself.enable (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Toggles the additional completions that automatically show method calls and field accesses
|
|
|
|
with `self` prefixed to them when inside a method.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.diagnostics.enable]]rust-analyzer.diagnostics.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show native rust-analyzer diagnostics.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.diagnostics.enableExperimental]]rust-analyzer.diagnostics.enableExperimental (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show experimental rust-analyzer diagnostics that might
|
|
|
|
have more false positives than usual.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.diagnostics.disabled]]rust-analyzer.diagnostics.disabled (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
List of rust-analyzer diagnostics to disable.
|
|
|
|
--
|
2021-04-21 22:09:37 +00:00
|
|
|
[[rust-analyzer.diagnostics.remapPrefix]]rust-analyzer.diagnostics.remapPrefix (default: `{}`)::
|
2021-04-21 03:03:35 +00:00
|
|
|
+
|
|
|
|
--
|
2021-04-21 22:09:37 +00:00
|
|
|
Map of prefixes to be substituted when parsing diagnostic file paths.
|
2021-04-21 03:03:35 +00:00
|
|
|
This should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.diagnostics.warningsAsHint]]rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-05-29 16:08:14 +00:00
|
|
|
List of warnings that should be displayed with hint severity.
|
2021-03-09 11:43:05 +00:00
|
|
|
|
2021-05-29 16:08:14 +00:00
|
|
|
The warnings will be indicated by faded text or three dots in code
|
|
|
|
and will not show up in the `Problems Panel`.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.diagnostics.warningsAsInfo]]rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-05-29 16:08:14 +00:00
|
|
|
List of warnings that should be displayed with info severity.
|
2021-03-09 11:43:05 +00:00
|
|
|
|
2021-05-29 16:08:14 +00:00
|
|
|
The warnings will be indicated by a blue squiggly underline in code
|
|
|
|
and a blue icon in the `Problems Panel`.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-09-27 15:11:31 +00:00
|
|
|
[[rust-analyzer.experimental.procAttrMacros]]rust-analyzer.experimental.procAttrMacros (default: `true`)::
|
2021-06-03 14:11:20 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Expand attribute macros.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Controls file watching implementation.
|
|
|
|
--
|
2021-01-26 13:18:01 +00:00
|
|
|
[[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-07-19 13:09:29 +00:00
|
|
|
These directories will be ignored by rust-analyzer. They are
|
|
|
|
relative to the workspace root, and globs are not supported. You may
|
2021-07-22 11:03:06 +00:00
|
|
|
also need to add the folders to Code's `files.watcherExclude`.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-07-23 01:04:27 +00:00
|
|
|
[[rust-analyzer.highlightRelated.references]]rust-analyzer.highlightRelated.references (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Enables highlighting of related references while hovering your mouse above any identifier.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.highlightRelated.exitPoints]]rust-analyzer.highlightRelated.exitPoints (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`).
|
|
|
|
--
|
|
|
|
[[rust-analyzer.highlightRelated.breakPoints]]rust-analyzer.highlightRelated.breakPoints (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.highlightRelated.yieldPoints]]rust-analyzer.highlightRelated.yieldPoints (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords.
|
|
|
|
--
|
2021-05-17 15:37:06 +00:00
|
|
|
[[rust-analyzer.highlighting.strings]]rust-analyzer.highlighting.strings (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Use semantic tokens for strings.
|
|
|
|
|
|
|
|
In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
|
|
|
|
By disabling semantic tokens for strings, other grammars can be used to highlight
|
|
|
|
their contents.
|
|
|
|
--
|
2021-06-14 13:25:10 +00:00
|
|
|
[[rust-analyzer.hover.documentation]]rust-analyzer.hover.documentation (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show documentation on hover.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.hover.linksInHover]]rust-analyzer.hover.linksInHover (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Use markdown syntax for links in hover.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.hoverActions.debug]]rust-analyzer.hoverActions.debug (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Debug` action. Only applies when
|
|
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.hoverActions.enable]]rust-analyzer.hoverActions.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show HoverActions in Rust files.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.hoverActions.gotoTypeDef]]rust-analyzer.hoverActions.gotoTypeDef (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Go to Type Definition` action. Only applies when
|
|
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.hoverActions.implementations]]rust-analyzer.hoverActions.implementations (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Implementations` action. Only applies when
|
|
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
|
|
--
|
2021-06-04 13:49:43 +00:00
|
|
|
[[rust-analyzer.hoverActions.references]]rust-analyzer.hoverActions.references (default: `false`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `References` action. Only applies when
|
|
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.hoverActions.run]]rust-analyzer.hoverActions.run (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Run` action. Only applies when
|
|
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.inlayHints.chainingHints]]rust-analyzer.inlayHints.chainingHints (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show inlay type hints for method chains.
|
|
|
|
--
|
2021-03-23 17:43:55 +00:00
|
|
|
[[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `25`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-03-23 17:04:48 +00:00
|
|
|
Maximum length for inlay hints. Set to null to have an unlimited length.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.inlayHints.parameterHints]]rust-analyzer.inlayHints.parameterHints (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show function parameter name inlay hints at the call
|
|
|
|
site.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.inlayHints.typeHints]]rust-analyzer.inlayHints.typeHints (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show inlay type hints for variables.
|
|
|
|
--
|
2021-11-13 23:39:34 +00:00
|
|
|
[[rust-analyzer.inlayHints.hideNamedConstructorHints]]rust-analyzer.inlayHints.hideNamedConstructorHints (default: `false`)::
|
2021-11-13 23:12:29 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to hide inlay hints for constructors.
|
|
|
|
--
|
2021-07-05 20:31:44 +00:00
|
|
|
[[rust-analyzer.joinLines.joinElseIf]]rust-analyzer.joinLines.joinElseIf (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Join lines inserts else between consecutive ifs.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.joinLines.removeTrailingComma]]rust-analyzer.joinLines.removeTrailingComma (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Join lines removes trailing commas.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.joinLines.unwrapTrivialBlock]]rust-analyzer.joinLines.unwrapTrivialBlock (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Join lines unwraps trivial blocks.
|
|
|
|
--
|
2021-08-22 18:28:39 +00:00
|
|
|
[[rust-analyzer.joinLines.joinAssignments]]rust-analyzer.joinLines.joinAssignments (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Join lines merges consecutive declaration and initialization of an assignment.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.lens.debug]]rust-analyzer.lens.debug (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Debug` lens. Only applies when
|
|
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.lens.enable]]rust-analyzer.lens.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show CodeLens in Rust files.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.lens.implementations]]rust-analyzer.lens.implementations (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Implementations` lens. Only applies when
|
|
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.lens.run]]rust-analyzer.lens.run (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Run` lens. Only applies when
|
|
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.lens.methodReferences]]rust-analyzer.lens.methodReferences (default: `false`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `Method References` lens. Only applies when
|
|
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
|
|
--
|
2021-01-23 13:56:20 +00:00
|
|
|
[[rust-analyzer.lens.references]]rust-analyzer.lens.references (default: `false`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
2021-10-04 07:30:46 +00:00
|
|
|
Whether to show `References` lens for Struct, Enum, Union and Trait.
|
|
|
|
Only applies when `#rust-analyzer.lens.enable#` is set.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.lens.enumVariantReferences]]rust-analyzer.lens.enumVariantReferences (default: `false`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `References` lens for Enum Variants.
|
|
|
|
Only applies when `#rust-analyzer.lens.enable#` is set.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
feat: gate custom clint-side commands behind capabilities
Some features of rust-analyzer requires support for custom commands on
the client side. Specifically, hover & code lens need this.
Stock LSP doesn't have a way for the server to know which client-side
commands are available. For that reason, we historically were just
sending the commands, not worrying whether the client supports then or
not.
That's not really great though, so in this PR we add infrastructure for
the client to explicitly opt-into custom commands, via `extensions`
field of the ClientCapabilities.
To preserve backwards compatability, if the client doesn't set the
field, we assume that it does support all custom commands. In the
future, we'll start treating that case as if the client doesn't support
commands.
So, if you maintain a rust-analyzer client and implement
`rust-analyzer/runSingle` and such, please also advertise this via a
capability.
2021-07-30 16:16:33 +00:00
|
|
|
[[rust-analyzer.lens.forceCustomCommands]]rust-analyzer.lens.forceCustomCommands (default: `true`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Internal config: use custom client-side commands even when the
|
|
|
|
client doesn't set the corresponding capability.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Disable project auto-discovery in favor of explicitly specified set
|
|
|
|
of projects.
|
|
|
|
|
|
|
|
Elements must be paths pointing to `Cargo.toml`,
|
|
|
|
`rust-project.json`, or JSON objects in `rust-project.json` format.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.lruCapacity]]rust-analyzer.lruCapacity (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.notifications.cargoTomlNotFound]]rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Whether to show `can't find Cargo.toml` error message.
|
|
|
|
--
|
2021-03-15 15:19:08 +00:00
|
|
|
[[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `true`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts#`.
|
|
|
|
--
|
2021-01-06 10:54:28 +00:00
|
|
|
[[rust-analyzer.procMacro.server]]rust-analyzer.procMacro.server (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Internal config, path to proc-macro server executable (typically,
|
|
|
|
this is rust-analyzer itself, but we override this in tests).
|
|
|
|
--
|
2022-01-06 12:44:21 +00:00
|
|
|
[[rust-analyzer.procMacro.ignored]]rust-analyzer.procMacro.ignored (default: `{}`)::
|
2022-01-05 18:35:48 +00:00
|
|
|
+
|
|
|
|
--
|
2022-01-06 12:44:21 +00:00
|
|
|
These proc-macros will be ignored when trying to expand them.
|
|
|
|
|
|
|
|
This config takes a map of crate names with the exported proc-macro names to ignore as values.
|
2022-01-05 18:35:48 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.runnables.overrideCargo]]rust-analyzer.runnables.overrideCargo (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Command to be executed instead of 'cargo' for runnables.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.runnables.cargoExtraArgs]]rust-analyzer.runnables.cargoExtraArgs (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Additional arguments to be passed to cargo for runnables such as
|
|
|
|
tests or binaries. For example, it may be `--release`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.rustcSource]]rust-analyzer.rustcSource (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
|
2021-10-14 05:49:22 +00:00
|
|
|
projects, or "discover" to try to automatically find it if the `rustc-dev` component
|
|
|
|
is installed.
|
2021-03-09 11:43:05 +00:00
|
|
|
|
|
|
|
Any project which uses rust-analyzer with the rustcPrivate
|
|
|
|
crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
|
|
|
|
|
2021-10-14 05:49:22 +00:00
|
|
|
This option does not take effect until rust-analyzer is restarted.
|
2021-03-09 11:43:05 +00:00
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Additional arguments to `rustfmt`.
|
|
|
|
--
|
2021-01-05 10:09:06 +00:00
|
|
|
[[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
|
2021-03-09 11:43:05 +00:00
|
|
|
+
|
|
|
|
--
|
|
|
|
Advanced option, fully override the command rust-analyzer uses for
|
|
|
|
formatting.
|
|
|
|
--
|
2021-05-04 21:13:51 +00:00
|
|
|
[[rust-analyzer.rustfmt.enableRangeFormatting]]rust-analyzer.rustfmt.enableRangeFormatting (default: `false`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Enables the use of rustfmt's unstable range formatting command for the
|
|
|
|
`textDocument/rangeFormatting` request. The rustfmt option is unstable and only
|
|
|
|
available on a nightly build.
|
|
|
|
--
|
2021-02-23 12:03:31 +00:00
|
|
|
[[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Workspace symbol search scope.
|
|
|
|
--
|
|
|
|
[[rust-analyzer.workspace.symbol.search.kind]]rust-analyzer.workspace.symbol.search.kind (default: `"only_types"`)::
|
|
|
|
+
|
|
|
|
--
|
|
|
|
Workspace symbol search kind.
|
|
|
|
--
|