mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
460e389f54
Config revamp Fixes https://github.com/rust-lang/rust-analyzer/issues/11790 Fixes https://github.com/rust-lang/rust-analyzer/issues/12115 This PR changes a lot of config names, and a few ones are being merged or split apart. The reason for this is that our configuration names currently are rather inconsistent and some where poorly chosen in regards to extensability. This PR plans to fix that. We still allow the old config names by patching them to the new ones before deserializing to keep backwards compatability with other clients (the VSCode client will auto update the config) but ideally we will get rid of that layer in the future. Here is a list of the changes: These are simple renames `old_name | alias1 | alias2 ... -> new_name` (the vscode client will fix these up automagically): ``` assist_allowMergingIntoGlobImports -> imports_merge_glob assist_exprFillDefault -> assist_expressionFillDefault assist_importEnforceGranularity -> imports_granularity_enforce assist_importGranularity | assist_importMergeBehavior | assist_importMergeBehaviour -> imports_granularity_group assist_importGroup -> imports_group_enable assist_importPrefix -> imports_prefix cache_warmup -> primeCaches_enable cargo_loadOutDirsFromCheck -> cargo_buildScripts_enable cargo_runBuildScripts | cargo_runBuildScriptsCommand -> cargo_runBuildScripts_overrideCommand cargo_useRustcWrapperForBuildScripts -> cargo_runBuildScripts_useRustcWrapper completion_snippets -> completion_snippets_custom diagnostics_enableExperimental -> diagnostics_experimental_enable experimental_procAttrMacros -> procMacro_attributes_enable highlighting_strings -> semanticHighlighting_strings_enable highlightRelated_breakPoints -> semanticHighlighting_breakPoints_enable highlightRelated_exitPoints -> semanticHighlighting_exitPoints_enable highlightRelated_yieldPoints -> semanticHighlighting_yieldPoints_enable highlightRelated_references -> semanticHighlighting_references_enable hover_documentation -> hover_documentation_enable hover_linksInHover | hoverActions_linksInHover -> hover_links_enable hoverActions_debug -> hoverActions_debug_enable hoverActions_enable -> hoverActions_enable_enable hoverActions_gotoTypeDef -> hoverActions_gotoTypeDef_enable hoverActions_implementations -> hoverActions_implementations_enable hoverActions_references -> hoverActions_references_enable hoverActions_run -> hoverActions_run_enable inlayHints_chainingHints -> inlayHints_chainingHints_enable inlayHints_closureReturnTypeHints -> inlayHints_closureReturnTypeHints_enable inlayHints_hideNamedConstructorHints -> inlayHints_typeHints_hideNamedConstructorHints inlayHints_parameterHints -> inlayHints_parameterHints_enable inlayHints_reborrowHints -> inlayHints_reborrowHints_enable inlayHints_typeHints -> inlayHints_typeHints_enable lruCapacity -> lru_capacity runnables_cargoExtraArgs -> runnables_extraArgs runnables_overrideCargo -> runnables_command rustcSource -> rustc_source rustfmt_enableRangeFormatting -> rustfmt_rangeFormatting_enable ``` These are configs that have been merged or split apart, which have to be manually updated by the user: ``` callInfo_full -> signatureInfo_detail, signatureInfo_documentation_enable cargo_allFeatures, cargo_features -> cargo_features checkOnSave_allFeatures, checkOnSave_features -> checkOnSave_features completion_addCallArgumentSnippets completion_addCallParenthesis -> completion_callable_snippets ```
589 lines
20 KiB
Text
589 lines
20 KiB
Text
[[rust-analyzer.assist.expressionFillDefault]]rust-analyzer.assist.expressionFillDefault (default: `"todo"`)::
|
|
+
|
|
--
|
|
Placeholder expression to use for missing expressions in assists.
|
|
--
|
|
[[rust-analyzer.cargo.autoreload]]rust-analyzer.cargo.autoreload (default: `true`)::
|
|
+
|
|
--
|
|
Automatically refresh project info via `cargo metadata` on
|
|
`Cargo.toml` or `.cargo/config.toml` changes.
|
|
--
|
|
[[rust-analyzer.cargo.buildScripts.enable]]rust-analyzer.cargo.buildScripts.enable (default: `true`)::
|
|
+
|
|
--
|
|
Run build scripts (`build.rs`) for more precise code analysis.
|
|
--
|
|
[[rust-analyzer.cargo.buildScripts.overrideCommand]]rust-analyzer.cargo.buildScripts.overrideCommand (default: `null`)::
|
|
+
|
|
--
|
|
Override the command rust-analyzer uses to run build scripts and
|
|
build procedural macros. The command is required to output json
|
|
and should therefor include `--message-format=json` or a similar
|
|
option.
|
|
|
|
By default, a cargo invocation will be constructed for the configured
|
|
targets and features, with the following base command line:
|
|
|
|
```bash
|
|
cargo check --quiet --workspace --message-format=json --all-targets
|
|
```
|
|
.
|
|
--
|
|
[[rust-analyzer.cargo.buildScripts.useRustcWrapper]]rust-analyzer.cargo.buildScripts.useRustcWrapper (default: `true`)::
|
|
+
|
|
--
|
|
Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
|
|
avoid compiling unnecessary things.
|
|
--
|
|
[[rust-analyzer.cargo.features]]rust-analyzer.cargo.features (default: `[]`)::
|
|
+
|
|
--
|
|
List of features to activate.
|
|
|
|
Set this to `"all"` to pass `--all-features` to cargo.
|
|
--
|
|
[[rust-analyzer.cargo.noDefaultFeatures]]rust-analyzer.cargo.noDefaultFeatures (default: `false`)::
|
|
+
|
|
--
|
|
Whether to pass `--no-default-features` to cargo.
|
|
--
|
|
[[rust-analyzer.cargo.noSysroot]]rust-analyzer.cargo.noSysroot (default: `false`)::
|
|
+
|
|
--
|
|
Internal config for debugging, disables loading of sysroot crates.
|
|
--
|
|
[[rust-analyzer.cargo.target]]rust-analyzer.cargo.target (default: `null`)::
|
|
+
|
|
--
|
|
Compilation target override (target triple).
|
|
--
|
|
[[rust-analyzer.cargo.unsetTest]]rust-analyzer.cargo.unsetTest (default: `["core"]`)::
|
|
+
|
|
--
|
|
Unsets `#[cfg(test)]` for the specified crates.
|
|
--
|
|
[[rust-analyzer.checkOnSave.allTargets]]rust-analyzer.checkOnSave.allTargets (default: `true`)::
|
|
+
|
|
--
|
|
Check all targets and tests (`--all-targets`).
|
|
--
|
|
[[rust-analyzer.checkOnSave.command]]rust-analyzer.checkOnSave.command (default: `"check"`)::
|
|
+
|
|
--
|
|
Cargo command to use for `cargo check`.
|
|
--
|
|
[[rust-analyzer.checkOnSave.enable]]rust-analyzer.checkOnSave.enable (default: `true`)::
|
|
+
|
|
--
|
|
Run specified `cargo check` command for diagnostics on save.
|
|
--
|
|
[[rust-analyzer.checkOnSave.extraArgs]]rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
|
|
+
|
|
--
|
|
Extra arguments for `cargo check`.
|
|
--
|
|
[[rust-analyzer.checkOnSave.features]]rust-analyzer.checkOnSave.features (default: `null`)::
|
|
+
|
|
--
|
|
List of features to activate. Defaults to
|
|
`#rust-analyzer.cargo.features#`.
|
|
|
|
Set to `"all"` to pass `--all-features` to cargo.
|
|
--
|
|
[[rust-analyzer.checkOnSave.noDefaultFeatures]]rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
|
|
+
|
|
--
|
|
Do not activate the `default` feature.
|
|
--
|
|
[[rust-analyzer.checkOnSave.overrideCommand]]rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
|
|
+
|
|
--
|
|
Override the command rust-analyzer uses to run build scripts and
|
|
build procedural macros. The command is required to output json
|
|
and should therefor include `--message-format=json` or a similar
|
|
option.
|
|
|
|
An example command would be:
|
|
|
|
```bash
|
|
cargo check --workspace --message-format=json --all-targets
|
|
```
|
|
.
|
|
--
|
|
[[rust-analyzer.checkOnSave.target]]rust-analyzer.checkOnSave.target (default: `null`)::
|
|
+
|
|
--
|
|
Check for a specific target. Defaults to
|
|
`#rust-analyzer.cargo.target#`.
|
|
--
|
|
[[rust-analyzer.completion.autoimport.enable]]rust-analyzer.completion.autoimport.enable (default: `true`)::
|
|
+
|
|
--
|
|
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.
|
|
--
|
|
[[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.
|
|
--
|
|
[[rust-analyzer.completion.callable.snippets]]rust-analyzer.completion.callable.snippets (default: `"fill_arguments"`)::
|
|
+
|
|
--
|
|
Whether to add parenthesis and argument snippets when completing function.
|
|
--
|
|
[[rust-analyzer.completion.postfix.enable]]rust-analyzer.completion.postfix.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
|
|
--
|
|
[[rust-analyzer.completion.privateEditable.enable]]rust-analyzer.completion.privateEditable.enable (default: `false`)::
|
|
+
|
|
--
|
|
Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.
|
|
--
|
|
[[rust-analyzer.completion.snippets.custom]]rust-analyzer.completion.snippets.custom::
|
|
+
|
|
--
|
|
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"
|
|
}
|
|
}
|
|
----
|
|
Custom completion snippets.
|
|
|
|
--
|
|
[[rust-analyzer.diagnostics.disabled]]rust-analyzer.diagnostics.disabled (default: `[]`)::
|
|
+
|
|
--
|
|
List of rust-analyzer diagnostics to disable.
|
|
--
|
|
[[rust-analyzer.diagnostics.enable]]rust-analyzer.diagnostics.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show native rust-analyzer diagnostics.
|
|
--
|
|
[[rust-analyzer.diagnostics.experimental.enable]]rust-analyzer.diagnostics.experimental.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show experimental rust-analyzer diagnostics that might
|
|
have more false positives than usual.
|
|
--
|
|
[[rust-analyzer.diagnostics.remapPrefix]]rust-analyzer.diagnostics.remapPrefix (default: `{}`)::
|
|
+
|
|
--
|
|
Map of prefixes to be substituted when parsing diagnostic file paths.
|
|
This should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.
|
|
--
|
|
[[rust-analyzer.diagnostics.warningsAsHint]]rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
|
|
+
|
|
--
|
|
List of warnings that should be displayed with hint severity.
|
|
|
|
The warnings will be indicated by faded text or three dots in code
|
|
and will not show up in the `Problems Panel`.
|
|
--
|
|
[[rust-analyzer.diagnostics.warningsAsInfo]]rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
|
|
+
|
|
--
|
|
List of warnings that should be displayed with info severity.
|
|
|
|
The warnings will be indicated by a blue squiggly underline in code
|
|
and a blue icon in the `Problems Panel`.
|
|
--
|
|
[[rust-analyzer.files.excludeDirs]]rust-analyzer.files.excludeDirs (default: `[]`)::
|
|
+
|
|
--
|
|
These directories will be ignored by rust-analyzer. They are
|
|
relative to the workspace root, and globs are not supported. You may
|
|
also need to add the folders to Code's `files.watcherExclude`.
|
|
--
|
|
[[rust-analyzer.files.watcher]]rust-analyzer.files.watcher (default: `"client"`)::
|
|
+
|
|
--
|
|
Controls file watching implementation.
|
|
--
|
|
[[rust-analyzer.highlightRelated.breakPoints.enable]]rust-analyzer.highlightRelated.breakPoints.enable (default: `true`)::
|
|
+
|
|
--
|
|
Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.
|
|
--
|
|
[[rust-analyzer.highlightRelated.exitPoints.enable]]rust-analyzer.highlightRelated.exitPoints.enable (default: `true`)::
|
|
+
|
|
--
|
|
Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).
|
|
--
|
|
[[rust-analyzer.highlightRelated.references.enable]]rust-analyzer.highlightRelated.references.enable (default: `true`)::
|
|
+
|
|
--
|
|
Enables highlighting of related references while the cursor is on any identifier.
|
|
--
|
|
[[rust-analyzer.highlightRelated.yieldPoints.enable]]rust-analyzer.highlightRelated.yieldPoints.enable (default: `true`)::
|
|
+
|
|
--
|
|
Enables highlighting of all break points for a loop or block context while the cursor is on any `async` or `await` keywords.
|
|
--
|
|
[[rust-analyzer.hover.actions.debug.enable]]rust-analyzer.hover.actions.debug.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Debug` action. Only applies when
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
--
|
|
[[rust-analyzer.hover.actions.enable]]rust-analyzer.hover.actions.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show HoverActions in Rust files.
|
|
--
|
|
[[rust-analyzer.hover.actions.gotoTypeDef.enable]]rust-analyzer.hover.actions.gotoTypeDef.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Go to Type Definition` action. Only applies when
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
--
|
|
[[rust-analyzer.hover.actions.implementations.enable]]rust-analyzer.hover.actions.implementations.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Implementations` action. Only applies when
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
--
|
|
[[rust-analyzer.hover.actions.references.enable]]rust-analyzer.hover.actions.references.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show `References` action. Only applies when
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
--
|
|
[[rust-analyzer.hover.actions.run.enable]]rust-analyzer.hover.actions.run.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Run` action. Only applies when
|
|
`#rust-analyzer.hoverActions.enable#` is set.
|
|
--
|
|
[[rust-analyzer.hover.documentation.enable]]rust-analyzer.hover.documentation.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show documentation on hover.
|
|
--
|
|
[[rust-analyzer.hover.links.enable]]rust-analyzer.hover.links.enable (default: `true`)::
|
|
+
|
|
--
|
|
Use markdown syntax for links in hover.
|
|
--
|
|
[[rust-analyzer.imports.granularity.enforce]]rust-analyzer.imports.granularity.enforce (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.
|
|
--
|
|
[[rust-analyzer.imports.granularity.group]]rust-analyzer.imports.granularity.group (default: `"crate"`)::
|
|
+
|
|
--
|
|
How imports should be grouped into use statements.
|
|
--
|
|
[[rust-analyzer.imports.group.enable]]rust-analyzer.imports.group.enable (default: `true`)::
|
|
+
|
|
--
|
|
Group inserted imports by the https://rust-analyzer.github.io/manual.html#auto-import[following order]. Groups are separated by newlines.
|
|
--
|
|
[[rust-analyzer.imports.merge.glob]]rust-analyzer.imports.merge.glob (default: `true`)::
|
|
+
|
|
--
|
|
Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
|
|
--
|
|
[[rust-analyzer.imports.prefix]]rust-analyzer.imports.prefix (default: `"plain"`)::
|
|
+
|
|
--
|
|
The path structure for newly inserted paths to use.
|
|
--
|
|
[[rust-analyzer.inlayHints.chainingHints.enable]]rust-analyzer.inlayHints.chainingHints.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show inlay type hints for method chains.
|
|
--
|
|
[[rust-analyzer.inlayHints.closureReturnTypeHints.enable]]rust-analyzer.inlayHints.closureReturnTypeHints.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show inlay type hints for return types of closures with blocks.
|
|
--
|
|
[[rust-analyzer.inlayHints.lifetimeElisionHints.enable]]rust-analyzer.inlayHints.lifetimeElisionHints.enable (default: `"never"`)::
|
|
+
|
|
--
|
|
Whether to show inlay type hints for elided lifetimes in function signatures.
|
|
--
|
|
[[rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames]]rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames (default: `false`)::
|
|
+
|
|
--
|
|
Whether to prefer using parameter names as the name for elided lifetime hints if possible.
|
|
--
|
|
[[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `25`)::
|
|
+
|
|
--
|
|
Maximum length for inlay hints. Set to null to have an unlimited length.
|
|
--
|
|
[[rust-analyzer.inlayHints.parameterHints.enable]]rust-analyzer.inlayHints.parameterHints.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show function parameter name inlay hints at the call
|
|
site.
|
|
--
|
|
[[rust-analyzer.inlayHints.reborrowHints.enable]]rust-analyzer.inlayHints.reborrowHints.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show inlay type hints for compiler inserted reborrows.
|
|
--
|
|
[[rust-analyzer.inlayHints.renderColons]]rust-analyzer.inlayHints.renderColons (default: `true`)::
|
|
+
|
|
--
|
|
Whether to render trailing colons for parameter hints, and trailing colons for parameter hints.
|
|
--
|
|
[[rust-analyzer.inlayHints.typeHints.enable]]rust-analyzer.inlayHints.typeHints.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show inlay type hints for variables.
|
|
--
|
|
[[rust-analyzer.inlayHints.typeHints.hideNamedConstructor]]rust-analyzer.inlayHints.typeHints.hideNamedConstructor (default: `false`)::
|
|
+
|
|
--
|
|
Whether to hide inlay type hints for constructors.
|
|
--
|
|
[[rust-analyzer.joinLines.joinAssignments]]rust-analyzer.joinLines.joinAssignments (default: `true`)::
|
|
+
|
|
--
|
|
Join lines merges consecutive declaration and initialization of an assignment.
|
|
--
|
|
[[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.
|
|
--
|
|
[[rust-analyzer.lens.debug.enable]]rust-analyzer.lens.debug.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Debug` lens. Only applies when
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.lens.enable]]rust-analyzer.lens.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show CodeLens in Rust files.
|
|
--
|
|
[[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.
|
|
--
|
|
[[rust-analyzer.lens.implementations.enable]]rust-analyzer.lens.implementations.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Implementations` lens. Only applies when
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.lens.references.adt.enable]]rust-analyzer.lens.references.adt.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show `References` lens for Struct, Enum, and Union.
|
|
Only applies when `#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.lens.references.enumVariant.enable]]rust-analyzer.lens.references.enumVariant.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show `References` lens for Enum Variants.
|
|
Only applies when `#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.lens.references.method.enable]]rust-analyzer.lens.references.method.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show `Method References` lens. Only applies when
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.lens.references.trait.enable]]rust-analyzer.lens.references.trait.enable (default: `false`)::
|
|
+
|
|
--
|
|
Whether to show `References` lens for Trait.
|
|
Only applies when `#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.lens.run.enable]]rust-analyzer.lens.run.enable (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `Run` lens. Only applies when
|
|
`#rust-analyzer.lens.enable#` is set.
|
|
--
|
|
[[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
|
|
+
|
|
--
|
|
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.
|
|
--
|
|
[[rust-analyzer.lru.capacity]]rust-analyzer.lru.capacity (default: `null`)::
|
|
+
|
|
--
|
|
Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
|
|
--
|
|
[[rust-analyzer.notifications.cargoTomlNotFound]]rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
|
|
+
|
|
--
|
|
Whether to show `can't find Cargo.toml` error message.
|
|
--
|
|
[[rust-analyzer.primeCaches.enable]]rust-analyzer.primeCaches.enable (default: `true`)::
|
|
+
|
|
--
|
|
Warm up caches on project load.
|
|
--
|
|
[[rust-analyzer.primeCaches.numThreads]]rust-analyzer.primeCaches.numThreads (default: `0`)::
|
|
+
|
|
--
|
|
How many worker threads to to handle priming caches. The default `0` means to pick automatically.
|
|
--
|
|
[[rust-analyzer.procMacro.attributes.enable]]rust-analyzer.procMacro.attributes.enable (default: `true`)::
|
|
+
|
|
--
|
|
Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
|
|
--
|
|
[[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `true`)::
|
|
+
|
|
--
|
|
Enable support for procedural macros, implies `#rust-analyzer.cargo.buildScripts.enable#`.
|
|
--
|
|
[[rust-analyzer.procMacro.ignored]]rust-analyzer.procMacro.ignored (default: `{}`)::
|
|
+
|
|
--
|
|
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.
|
|
--
|
|
[[rust-analyzer.procMacro.server]]rust-analyzer.procMacro.server (default: `null`)::
|
|
+
|
|
--
|
|
Internal config, path to proc-macro server executable (typically,
|
|
this is rust-analyzer itself, but we override this in tests).
|
|
--
|
|
[[rust-analyzer.runnables.command]]rust-analyzer.runnables.command (default: `null`)::
|
|
+
|
|
--
|
|
Command to be executed instead of 'cargo' for runnables.
|
|
--
|
|
[[rust-analyzer.runnables.extraArgs]]rust-analyzer.runnables.extraArgs (default: `[]`)::
|
|
+
|
|
--
|
|
Additional arguments to be passed to cargo for runnables such as
|
|
tests or binaries. For example, it may be `--release`.
|
|
--
|
|
[[rust-analyzer.rustc.source]]rust-analyzer.rustc.source (default: `null`)::
|
|
+
|
|
--
|
|
Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
|
|
projects, or "discover" to try to automatically find it if the `rustc-dev` component
|
|
is installed.
|
|
|
|
Any project which uses rust-analyzer with the rustcPrivate
|
|
crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
|
|
|
|
This option does not take effect until rust-analyzer is restarted.
|
|
--
|
|
[[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
|
|
+
|
|
--
|
|
Additional arguments to `rustfmt`.
|
|
--
|
|
[[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
|
|
+
|
|
--
|
|
Advanced option, fully override the command rust-analyzer uses for
|
|
formatting.
|
|
--
|
|
[[rust-analyzer.rustfmt.rangeFormatting.enable]]rust-analyzer.rustfmt.rangeFormatting.enable (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.
|
|
--
|
|
[[rust-analyzer.semanticHighlighting.strings.enable]]rust-analyzer.semanticHighlighting.strings.enable (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.
|
|
--
|
|
[[rust-analyzer.signatureInfo.detail]]rust-analyzer.signatureInfo.detail (default: `"full"`)::
|
|
+
|
|
--
|
|
Show full signature of the callable. Only shows parameters if disabled.
|
|
--
|
|
[[rust-analyzer.signatureInfo.documentation.enable]]rust-analyzer.signatureInfo.documentation.enable (default: `true`)::
|
|
+
|
|
--
|
|
Show documentation.
|
|
--
|
|
[[rust-analyzer.workspace.symbol.search.kind]]rust-analyzer.workspace.symbol.search.kind (default: `"only_types"`)::
|
|
+
|
|
--
|
|
Workspace symbol search kind.
|
|
--
|
|
[[rust-analyzer.workspace.symbol.search.limit]]rust-analyzer.workspace.symbol.search.limit (default: `128`)::
|
|
+
|
|
--
|
|
Limits the number of items returned from a workspace symbol search (Defaults to 128).
|
|
Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
|
|
Other clients requires all results upfront and might require a higher limit.
|
|
--
|
|
[[rust-analyzer.workspace.symbol.search.scope]]rust-analyzer.workspace.symbol.search.scope (default: `"workspace"`)::
|
|
+
|
|
--
|
|
Workspace symbol search scope.
|
|
--
|