diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-01-08 13:40:53 +0100 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-01-08 13:40:53 +0100 |
| commit | 2f3ee5dae58447454bcf2d2c8bb40577e87a3c1b (patch) | |
| tree | 62f9293b25cc5f9af35d2338559afb224b00a719 /src/tools/rust-analyzer/docs | |
| parent | a5e424e07af577c87d46e5eddc1c3a1eb014d343 (diff) | |
| parent | 93a19501c2bad56e73f0ac9f3ae062b614d30832 (diff) | |
Merge from rustc
Diffstat (limited to 'src/tools/rust-analyzer/docs')
| -rw-r--r-- | src/tools/rust-analyzer/docs/dev/lsp-extensions.md | 2 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/docs/user/generated_config.adoc | 67 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/docs/user/manual.adoc | 2 |
3 files changed, 62 insertions, 9 deletions
diff --git a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md index 0e37611a549..21ac3a5a269 100644 --- a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md +++ b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md @@ -1,5 +1,5 @@ <!--- -lsp/ext.rs hash: 9790509d87670c22 +lsp/ext.rs hash: 6dd762ae19630ec0 If you need to change the above hash to make the test pass, please check if you need to adjust this doc as well and ping this issue: diff --git a/src/tools/rust-analyzer/docs/user/generated_config.adoc b/src/tools/rust-analyzer/docs/user/generated_config.adoc index 142aa22a704..5b86766aa8e 100644 --- a/src/tools/rust-analyzer/docs/user/generated_config.adoc +++ b/src/tools/rust-analyzer/docs/user/generated_config.adoc @@ -135,12 +135,6 @@ Unsetting this disables sysroot loading. This option does not take effect until rust-analyzer is restarted. -- -[[rust-analyzer.cargo.sysrootQueryMetadata]]rust-analyzer.cargo.sysrootQueryMetadata (default: `"cargo_metadata"`):: -+ --- -How to query metadata for the sysroot crate. Using cargo metadata allows rust-analyzer -to analyze third-party dependencies of the standard libraries. --- [[rust-analyzer.cargo.sysrootSrc]]rust-analyzer.cargo.sysrootSrc (default: `null`):: + -- @@ -152,7 +146,7 @@ This option does not take effect until rust-analyzer is restarted. [[rust-analyzer.cargo.target]]rust-analyzer.cargo.target (default: `null`):: + -- -Compilation target override (target triple). +Compilation target override (target tuple). -- [[rust-analyzer.cargo.targetDir]]rust-analyzer.cargo.targetDir (default: `null`):: + @@ -286,6 +280,35 @@ In `match` arms it completes a comma instead. 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.autoimport.exclude]]rust-analyzer.completion.autoimport.exclude:: ++ +-- +Default: +---- +[ + { + "path": "core::borrow::Borrow", + "type": "methods" + }, + { + "path": "core::borrow::BorrowMut", + "type": "methods" + } +] +---- +A list of full paths to items to exclude from auto-importing completions. + +Traits in this list won't have their methods suggested in completions unless the trait +is in scope. + +You can either specify a string path which defaults to type "always" or use the more verbose +form `{ "path": "path::to::item", type: "always" }`. + +For traits the type "methods" can be used to only exclude the methods but not the trait itself. + +This setting also inherits `#rust-analyzer.completion.excludeTraits#`. + +-- [[rust-analyzer.completion.autoself.enable]]rust-analyzer.completion.autoself.enable (default: `true`):: + -- @@ -297,6 +320,15 @@ with `self` prefixed to them when inside a method. -- Whether to add parenthesis and argument snippets when completing function. -- +[[rust-analyzer.completion.excludeTraits]]rust-analyzer.completion.excludeTraits (default: `[]`):: ++ +-- +A list of full paths to traits whose methods to exclude from completion. + +Methods from these traits won't be completed, even if the trait is in scope. However, they will still be suggested on expressions whose type is `dyn Trait`, `impl Trait` or `T where T: Trait`. + +Note that the trait themselves can still be completed. +-- [[rust-analyzer.completion.fullFunctionSignatures.enable]]rust-analyzer.completion.fullFunctionSignatures.enable (default: `false`):: + -- @@ -497,6 +529,12 @@ Whether to show `References` action. Only applies when Whether to show `Run` action. Only applies when `#rust-analyzer.hover.actions.enable#` is set. -- +[[rust-analyzer.hover.actions.updateTest.enable]]rust-analyzer.hover.actions.updateTest.enable (default: `true`):: ++ +-- +Whether to show `Update Test` action. Only applies when +`#rust-analyzer.hover.actions.enable#` and `#rust-analyzer.hover.actions.run.enable#` are set. +-- [[rust-analyzer.hover.documentation.enable]]rust-analyzer.hover.documentation.enable (default: `true`):: + -- @@ -513,6 +551,15 @@ Whether to show keyword hover popups. Only applies when -- Use markdown syntax for links on hover. -- +[[rust-analyzer.hover.maxSubstitutionLength]]rust-analyzer.hover.maxSubstitutionLength (default: `20`):: ++ +-- +Whether to show what types are used as generic arguments in calls etc. on hover, and what is their max length to show such types, beyond it they will be shown with ellipsis. + +This can take three values: `null` means "unlimited", the string `"hide"` means to not show generic substitutions at all, and a number means to limit them to X characters. + +The default is 20 characters. +-- [[rust-analyzer.hover.memoryLayout.alignment]]rust-analyzer.hover.memoryLayout.alignment (default: `"hexadecimal"`):: + -- @@ -799,6 +846,12 @@ Only applies when `#rust-analyzer.lens.enable#` is set. Whether to show `Run` lens. Only applies when `#rust-analyzer.lens.enable#` is set. -- +[[rust-analyzer.lens.updateTest.enable]]rust-analyzer.lens.updateTest.enable (default: `true`):: ++ +-- +Whether to show `Update Test` lens. Only applies when +`#rust-analyzer.lens.enable#` and `#rust-analyzer.lens.run.enable#` are set. +-- [[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`):: + -- diff --git a/src/tools/rust-analyzer/docs/user/manual.adoc b/src/tools/rust-analyzer/docs/user/manual.adoc index da2aa4eae4e..ffc820e9b7f 100644 --- a/src/tools/rust-analyzer/docs/user/manual.adoc +++ b/src/tools/rust-analyzer/docs/user/manual.adoc @@ -769,7 +769,7 @@ interface Crate { /// The set of cfgs activated for a given crate, like /// `["unix", "feature=\"foo\"", "feature=\"bar\""]`. cfg: string[]; - /// Target triple for this Crate. + /// Target tuple for this Crate. /// /// Used when running `rustc --print cfg` /// to get target-specific cfgs. |
