Skip to content

Commit 013739c

Browse files
bors[bot]rherrmann
andauthored
Merge #6993
6993: Clean up descriptions for settings r=matklad a=rherrmann Use two consecutive newlines (`\n\n`) to actually continue text on a new line. Use proper markup to reference related settings. Consistently format references to files, command line arguments, etc. as `code`. Format mentions of UI elements in _italic_. Fix typos, add missing full-stops, add missing default values. Co-authored-by: Rüdiger Herrmann <[email protected]>
2 parents e1acb0c + 9f07053 commit 013739c

File tree

3 files changed

+55
-55
lines changed

3 files changed

+55
-55
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ config_data! {
3333
callInfo_full: bool = "true",
3434

3535
/// Automatically refresh project info via `cargo metadata` on
36-
/// Cargo.toml changes.
36+
/// `Cargo.toml` changes.
3737
cargo_autoreload: bool = "true",
3838
/// Activate all available features.
3939
cargo_allFeatures: bool = "false",
@@ -52,7 +52,7 @@ config_data! {
5252
/// Run specified `cargo check` command for diagnostics on save.
5353
checkOnSave_enable: bool = "true",
5454
/// Check with all features (will be passed as `--all-features`).
55-
/// Defaults to `rust-analyzer.cargo.allFeatures`.
55+
/// Defaults to `#rust-analyzer.cargo.allFeatures#`.
5656
checkOnSave_allFeatures: Option<bool> = "null",
5757
/// Check all targets and tests (will be passed as `--all-targets`).
5858
checkOnSave_allTargets: bool = "true",
@@ -61,12 +61,12 @@ config_data! {
6161
/// Do not activate the `default` feature.
6262
checkOnSave_noDefaultFeatures: Option<bool> = "null",
6363
/// Check for a specific target. Defaults to
64-
/// `rust-analyzer.cargo.target`.
64+
/// `#rust-analyzer.cargo.target#`.
6565
checkOnSave_target: Option<String> = "null",
6666
/// Extra arguments for `cargo check`.
6767
checkOnSave_extraArgs: Vec<String> = "[]",
6868
/// List of features to activate. Defaults to
69-
/// `rust-analyzer.cargo.features`.
69+
/// `#rust-analyzer.cargo.features#`.
7070
checkOnSave_features: Option<Vec<String>> = "null",
7171
/// Advanced option, fully override the command rust-analyzer uses for
7272
/// checking. The command should include `--message-format=json` or
@@ -80,7 +80,7 @@ config_data! {
8080
/// Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
8181
completion_postfix_enable: bool = "true",
8282
/// Toggles the additional completions that automatically add imports when completed.
83-
/// Note that your client have to specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
83+
/// Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
8484
completion_autoimport_enable: bool = "true",
8585

8686
/// Whether to show native rust-analyzer diagnostics.
@@ -90,13 +90,13 @@ config_data! {
9090
diagnostics_enableExperimental: bool = "true",
9191
/// List of rust-analyzer diagnostics to disable.
9292
diagnostics_disabled: FxHashSet<String> = "[]",
93-
/// List of warnings that should be displayed with info severity.\nThe
93+
/// List of warnings that should be displayed with info severity.\n\nThe
9494
/// warnings will be indicated by a blue squiggly underline in code and
95-
/// a blue icon in the problems panel.
95+
/// a blue icon in the `Problems Panel`.
9696
diagnostics_warningsAsHint: Vec<String> = "[]",
97-
/// List of warnings that should be displayed with hint severity.\nThe
97+
/// List of warnings that should be displayed with hint severity.\n\nThe
9898
/// warnings will be indicated by faded text or three dots in code and
99-
/// will not show up in the problems panel.
99+
/// will not show up in the `Problems Panel`.
100100
diagnostics_warningsAsInfo: Vec<String> = "[]",
101101

102102
/// Controls file watching implementation.
@@ -121,7 +121,7 @@ config_data! {
121121

122122
/// Whether to show inlay type hints for method chains.
123123
inlayHints_chainingHints: bool = "true",
124-
/// Maximum length for inlay hints.
124+
/// Maximum length for inlay hints. Default is unlimited.
125125
inlayHints_maxLength: Option<usize> = "null",
126126
/// Whether to show function parameter name inlay hints at the call
127127
/// site.
@@ -145,27 +145,27 @@ config_data! {
145145
lens_methodReferences: bool = "false",
146146

147147
/// Disable project auto-discovery in favor of explicitly specified set
148-
/// of projects. \nElements must be paths pointing to Cargo.toml,
149-
/// rust-project.json, or JSON objects in rust-project.json format.
148+
/// of projects.\n\nElements must be paths pointing to `Cargo.toml`,
149+
/// `rust-project.json`, or JSON objects in `rust-project.json` format.
150150
linkedProjects: Vec<ManifestOrProjectJson> = "[]",
151-
/// Number of syntax trees rust-analyzer keeps in memory.
151+
/// Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
152152
lruCapacity: Option<usize> = "null",
153153
/// Whether to show `can't find Cargo.toml` error message.
154154
notifications_cargoTomlNotFound: bool = "true",
155-
/// Enable Proc macro support, cargo.loadOutDirsFromCheck must be
155+
/// Enable Proc macro support, `#rust-analyzer.cargo.loadOutDirsFromCheck#` must be
156156
/// enabled.
157157
procMacro_enable: bool = "false",
158158

159159
/// Command to be executed instead of 'cargo' for runnables.
160160
runnables_overrideCargo: Option<String> = "null",
161161
/// Additional arguments to be passed to cargo for runnables such as
162-
/// tests or binaries.\nFor example, it may be '--release'.
162+
/// tests or binaries.\nFor example, it may be `--release`.
163163
runnables_cargoExtraArgs: Vec<String> = "[]",
164164

165165
/// Path to the rust compiler sources, for usage in rustc_private projects.
166166
rustcSource : Option<String> = "null",
167167

168-
/// Additional arguments to rustfmt.
168+
/// Additional arguments to `rustfmt`.
169169
rustfmt_extraArgs: Vec<String> = "[]",
170170
/// Advanced option, fully override the command rust-analyzer uses for
171171
/// formatting.
@@ -758,7 +758,7 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
758758
],
759759
"enumDescriptions": [
760760
"Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.",
761-
"Prefix all import paths with `self` if they don't begin with `self`, `super`, `crate` or a crate name",
761+
"Prefix all import paths with `self` if they don't begin with `self`, `super`, `crate` or a crate name.",
762762
"Force import paths to be absolute by always starting them with `crate` or the crate name they refer to."
763763
],
764764
},

docs/user/generated_config.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rust-analyzer.assist.importPrefix (default: `"plain"`)::
55
rust-analyzer.callInfo.full (default: `true`)::
66
Show function name and docs in parameter hints.
77
rust-analyzer.cargo.autoreload (default: `true`)::
8-
Automatically refresh project info via `cargo metadata` on Cargo.toml changes.
8+
Automatically refresh project info via `cargo metadata` on `Cargo.toml` changes.
99
rust-analyzer.cargo.allFeatures (default: `false`)::
1010
Activate all available features.
1111
rust-analyzer.cargo.features (default: `[]`)::
@@ -21,19 +21,19 @@ rust-analyzer.cargo.noSysroot (default: `false`)::
2121
rust-analyzer.checkOnSave.enable (default: `true`)::
2222
Run specified `cargo check` command for diagnostics on save.
2323
rust-analyzer.checkOnSave.allFeatures (default: `null`)::
24-
Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`.
24+
Check with all features (will be passed as `--all-features`). Defaults to `#rust-analyzer.cargo.allFeatures#`.
2525
rust-analyzer.checkOnSave.allTargets (default: `true`)::
2626
Check all targets and tests (will be passed as `--all-targets`).
2727
rust-analyzer.checkOnSave.command (default: `"check"`)::
2828
Cargo command to use for `cargo check`.
2929
rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
3030
Do not activate the `default` feature.
3131
rust-analyzer.checkOnSave.target (default: `null`)::
32-
Check for a specific target. Defaults to `rust-analyzer.cargo.target`.
32+
Check for a specific target. Defaults to `#rust-analyzer.cargo.target#`.
3333
rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
3434
Extra arguments for `cargo check`.
3535
rust-analyzer.checkOnSave.features (default: `null`)::
36-
List of features to activate. Defaults to `rust-analyzer.cargo.features`.
36+
List of features to activate. Defaults to `#rust-analyzer.cargo.features#`.
3737
rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
3838
Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message-format=json` or similar option.
3939
rust-analyzer.completion.addCallArgumentSnippets (default: `true`)::
@@ -43,17 +43,17 @@ rust-analyzer.completion.addCallParenthesis (default: `true`)::
4343
rust-analyzer.completion.postfix.enable (default: `true`)::
4444
Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
4545
rust-analyzer.completion.autoimport.enable (default: `true`)::
46-
Toggles the additional completions that automatically add imports when completed. Note that your client have to specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
46+
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.
4747
rust-analyzer.diagnostics.enable (default: `true`)::
4848
Whether to show native rust-analyzer diagnostics.
4949
rust-analyzer.diagnostics.enableExperimental (default: `true`)::
5050
Whether to show experimental rust-analyzer diagnostics that might have more false positives than usual.
5151
rust-analyzer.diagnostics.disabled (default: `[]`)::
5252
List of rust-analyzer diagnostics to disable.
5353
rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
54-
List of warnings that should be displayed with info severity.\nThe warnings will be indicated by a blue squiggly underline in code and a blue icon in the problems panel.
54+
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`.
5555
rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
56-
List of warnings that should be displayed with hint severity.\nThe warnings will be indicated by faded text or three dots in code and will not show up in the problems panel.
56+
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`.
5757
rust-analyzer.files.watcher (default: `"client"`)::
5858
Controls file watching implementation.
5959
rust-analyzer.hoverActions.debug (default: `true`)::
@@ -71,7 +71,7 @@ rust-analyzer.hoverActions.linksInHover (default: `true`)::
7171
rust-analyzer.inlayHints.chainingHints (default: `true`)::
7272
Whether to show inlay type hints for method chains.
7373
rust-analyzer.inlayHints.maxLength (default: `null`)::
74-
Maximum length for inlay hints.
74+
Maximum length for inlay hints. Default is unlimited.
7575
rust-analyzer.inlayHints.parameterHints (default: `true`)::
7676
Whether to show function parameter name inlay hints at the call site.
7777
rust-analyzer.inlayHints.typeHints (default: `true`)::
@@ -87,20 +87,20 @@ rust-analyzer.lens.run (default: `true`)::
8787
rust-analyzer.lens.methodReferences (default: `false`)::
8888
Whether to show `Method References` lens. Only applies when `#rust-analyzer.lens.enable#` is set.
8989
rust-analyzer.linkedProjects (default: `[]`)::
90-
Disable project auto-discovery in favor of explicitly specified set of projects. \nElements must be paths pointing to Cargo.toml, rust-project.json, or JSON objects in rust-project.json format.
90+
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.
9191
rust-analyzer.lruCapacity (default: `null`)::
92-
Number of syntax trees rust-analyzer keeps in memory.
92+
Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
9393
rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
9494
Whether to show `can't find Cargo.toml` error message.
9595
rust-analyzer.procMacro.enable (default: `false`)::
96-
Enable Proc macro support, cargo.loadOutDirsFromCheck must be enabled.
96+
Enable Proc macro support, `#rust-analyzer.cargo.loadOutDirsFromCheck#` must be enabled.
9797
rust-analyzer.runnables.overrideCargo (default: `null`)::
9898
Command to be executed instead of 'cargo' for runnables.
9999
rust-analyzer.runnables.cargoExtraArgs (default: `[]`)::
100-
Additional arguments to be passed to cargo for runnables such as tests or binaries.\nFor example, it may be '--release'.
100+
Additional arguments to be passed to cargo for runnables such as tests or binaries.\nFor example, it may be `--release`.
101101
rust-analyzer.rustcSource (default: `null`)::
102102
Path to the rust compiler sources, for usage in rustc_private projects.
103103
rust-analyzer.rustfmt.extraArgs (default: `[]`)::
104-
Additional arguments to rustfmt.
104+
Additional arguments to `rustfmt`.
105105
rust-analyzer.rustfmt.overrideCommand (default: `null`)::
106106
Advanced option, fully override the command rust-analyzer uses for formatting.

0 commit comments

Comments
 (0)