@@ -52,24 +52,35 @@ use crate::{
52
52
// parsing the old name.
53
53
config_data ! {
54
54
struct ConfigData {
55
- /// Placeholder for missing expressions in assists.
55
+ /// Placeholder expression to use for missing expressions in assists.
56
56
assist_expressionFillDefault: ExprFillDefaultDef = "\" todo\" " ,
57
57
58
58
/// Automatically refresh project info via `cargo metadata` on
59
59
/// `Cargo.toml` changes.
60
60
cargo_autoreload: bool = "true" ,
61
61
/// Run build scripts (`build.rs`) for more precise code analysis.
62
62
cargo_buildScripts_enable: bool = "true" ,
63
- /// Advanced option, fully override the command rust-analyzer uses to
64
- /// run build scripts and build procedural macros. The command should
65
- /// include `--message-format=json` or a similar option.
63
+ /// Override the command rust-analyzer uses to run build scripts and
64
+ /// build procedural macros. The command is required to output json
65
+ /// and should therefor include `--message-format=json` or a similar
66
+ /// option.
67
+ ///
68
+ /// By default, a cargo invocation will be constructed for the configured
69
+ /// targets and features, with the following base command line:
70
+ ///
71
+ /// ```bash
72
+ /// cargo check --quiet --workspace --message-format=json --all-targets
73
+ /// ```
74
+ /// .
66
75
cargo_buildScripts_overrideCommand: Option <Vec <String >> = "null" ,
67
76
/// Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
68
77
/// avoid compiling unnecessary things.
69
78
cargo_buildScripts_useRustcWrapper: bool = "true" ,
70
- /// List of features to activate. Set to `"all"` to pass `--all-features` to cargo.
79
+ /// List of features to activate.
80
+ ///
81
+ /// Set this to `"all"` to pass `--all-features` to cargo.
71
82
cargo_features: CargoFeatures = "[]" ,
72
- /// Do not activate the ` default` feature .
83
+ /// Whether to pass `--no- default-features` to cargo .
73
84
cargo_noDefaultFeatures: bool = "false" ,
74
85
/// Internal config for debugging, disables loading of sysroot crates.
75
86
cargo_noSysroot: bool = "false" ,
@@ -87,13 +98,23 @@ config_data! {
87
98
/// Extra arguments for `cargo check`.
88
99
checkOnSave_extraArgs: Vec <String > = "[]" ,
89
100
/// List of features to activate. Defaults to
90
- /// `#rust-analyzer.cargo.features#`. Set to `"all"` to pass `--all-features` to cargo.
101
+ /// `#rust-analyzer.cargo.features#`.
102
+ ///
103
+ /// Set to `"all"` to pass `--all-features` to cargo.
91
104
checkOnSave_features: Option <CargoFeatures > = "null" ,
92
105
/// Do not activate the `default` feature.
93
106
checkOnSave_noDefaultFeatures: Option <bool > = "null" ,
94
- /// Advanced option, fully override the command rust-analyzer uses for
95
- /// checking. The command should include `--message-format=json` or
96
- /// similar option.
107
+ /// Override the command rust-analyzer uses to run build scripts and
108
+ /// build procedural macros. The command is required to output json
109
+ /// and should therefor include `--message-format=json` or a similar
110
+ /// option.
111
+ ///
112
+ /// An example command would be:
113
+ ///
114
+ /// ```bash
115
+ /// cargo check --workspace --message-format=json --all-targets
116
+ /// ```
117
+ /// .
97
118
checkOnSave_overrideCommand: Option <Vec <String >> = "null" ,
98
119
/// Check for a specific target. Defaults to
99
120
/// `#rust-analyzer.cargo.target#`.
@@ -183,13 +204,13 @@ config_data! {
183
204
/// Controls file watching implementation.
184
205
files_watcher: String = "\" client\" " ,
185
206
186
- /// Enables highlighting of related references while hovering your mouse `break`, `loop`, `while`, or `for` keywords.
207
+ /// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.
187
208
highlightRelated_breakPoints_enable: bool = "true" ,
188
- /// Enables highlighting of all exit points while hovering your mouse above any `return`, `?`, or return type arrow (`->`).
209
+ /// Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn `, or return type arrow (`->`).
189
210
highlightRelated_exitPoints_enable: bool = "true" ,
190
- /// Enables highlighting of related references while hovering your mouse above any identifier.
211
+ /// Enables highlighting of related references while the cursor is on any identifier.
191
212
highlightRelated_references_enable: bool = "true" ,
192
- /// Enables highlighting of all break points for a loop or block context while hovering your mouse above any `async` or `await` keywords.
213
+ /// Enables highlighting of all break points for a loop or block context while the cursor is on any `async` or `await` keywords.
193
214
highlightRelated_yieldPoints_enable: bool = "true" ,
194
215
195
216
/// Whether to show `Debug` action. Only applies when
@@ -233,20 +254,20 @@ config_data! {
233
254
/// Whether to show inlay type hints for elided lifetimes in function signatures.
234
255
inlayHints_lifetimeElisionHints_enable: LifetimeElisionDef = "\" never\" " ,
235
256
/// Whether to prefer using parameter names as the name for elided lifetime hints if possible.
236
- inlayHints_lifetimeElisionHints_useParameterNames: bool = "false" ,
257
+ inlayHints_lifetimeElisionHints_useParameterNames: bool = "false" ,
237
258
/// Maximum length for inlay hints. Set to null to have an unlimited length.
238
- inlayHints_maxLength: Option <usize > = "25" ,
259
+ inlayHints_maxLength: Option <usize > = "25" ,
239
260
/// Whether to show function parameter name inlay hints at the call
240
261
/// site.
241
262
inlayHints_parameterHints_enable: bool = "true" ,
242
263
/// Whether to show inlay type hints for compiler inserted reborrows.
243
264
inlayHints_reborrowHints_enable: bool = "false" ,
244
265
/// Whether to render trailing colons for parameter hints, and trailing colons for parameter hints.
245
- inlayHints_renderColons: bool = "true" ,
266
+ inlayHints_renderColons: bool = "true" ,
246
267
/// Whether to show inlay type hints for variables.
247
268
inlayHints_typeHints_enable: bool = "true" ,
248
- /// Whether to hide inlay hints for constructors.
249
- inlayHints_typeHints_hideNamedConstructor: bool = "false" ,
269
+ /// Whether to hide inlay type hints for constructors.
270
+ inlayHints_typeHints_hideNamedConstructor: bool = "false" ,
250
271
251
272
/// Join lines merges consecutive declaration and initialization of an assignment.
252
273
joinLines_joinAssignments: bool = "true" ,
@@ -304,7 +325,7 @@ config_data! {
304
325
305
326
/// Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
306
327
procMacro_attributes_enable: bool = "true" ,
307
- /// Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts #`.
328
+ /// Enable support for procedural macros, implies `#rust-analyzer.cargo.buildScripts.enable #`.
308
329
procMacro_enable: bool = "true" ,
309
330
/// These proc-macros will be ignored when trying to expand them.
310
331
///
0 commit comments