@@ -52,24 +52,35 @@ use crate::{
5252// parsing the old name.
5353config_data ! {
5454 struct ConfigData {
55- /// Placeholder for missing expressions in assists.
55+ /// Placeholder expression to use for missing expressions in assists.
5656 assist_expressionFillDefault: ExprFillDefaultDef = "\" todo\" " ,
5757
5858 /// Automatically refresh project info via `cargo metadata` on
5959 /// `Cargo.toml` changes.
6060 cargo_autoreload: bool = "true" ,
6161 /// Run build scripts (`build.rs`) for more precise code analysis.
6262 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+ /// .
6675 cargo_buildScripts_overrideCommand: Option <Vec <String >> = "null" ,
6776 /// Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
6877 /// avoid compiling unnecessary things.
6978 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.
7182 cargo_features: CargoFeatures = "[]" ,
72- /// Do not activate the ` default` feature .
83+ /// Whether to pass `--no- default-features` to cargo .
7384 cargo_noDefaultFeatures: bool = "false" ,
7485 /// Internal config for debugging, disables loading of sysroot crates.
7586 cargo_noSysroot: bool = "false" ,
@@ -87,13 +98,23 @@ config_data! {
8798 /// Extra arguments for `cargo check`.
8899 checkOnSave_extraArgs: Vec <String > = "[]" ,
89100 /// 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.
91104 checkOnSave_features: Option <CargoFeatures > = "null" ,
92105 /// Do not activate the `default` feature.
93106 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+ /// .
97118 checkOnSave_overrideCommand: Option <Vec <String >> = "null" ,
98119 /// Check for a specific target. Defaults to
99120 /// `#rust-analyzer.cargo.target#`.
@@ -183,13 +204,13 @@ config_data! {
183204 /// Controls file watching implementation.
184205 files_watcher: String = "\" client\" " ,
185206
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.
187208 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 (`->`).
189210 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.
191212 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.
193214 highlightRelated_yieldPoints_enable: bool = "true" ,
194215
195216 /// Whether to show `Debug` action. Only applies when
@@ -233,20 +254,20 @@ config_data! {
233254 /// Whether to show inlay type hints for elided lifetimes in function signatures.
234255 inlayHints_lifetimeElisionHints_enable: LifetimeElisionDef = "\" never\" " ,
235256 /// 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" ,
237258 /// 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" ,
239260 /// Whether to show function parameter name inlay hints at the call
240261 /// site.
241262 inlayHints_parameterHints_enable: bool = "true" ,
242263 /// Whether to show inlay type hints for compiler inserted reborrows.
243264 inlayHints_reborrowHints_enable: bool = "false" ,
244265 /// Whether to render trailing colons for parameter hints, and trailing colons for parameter hints.
245- inlayHints_renderColons: bool = "true" ,
266+ inlayHints_renderColons: bool = "true" ,
246267 /// Whether to show inlay type hints for variables.
247268 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" ,
250271
251272 /// Join lines merges consecutive declaration and initialization of an assignment.
252273 joinLines_joinAssignments: bool = "true" ,
@@ -304,7 +325,7 @@ config_data! {
304325
305326 /// Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
306327 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 #`.
308329 procMacro_enable: bool = "true" ,
309330 /// These proc-macros will be ignored when trying to expand them.
310331 ///
0 commit comments