Skip to content

Commit 277cf5f

Browse files
committed
doc: make example for workspace.discoverConfig actually work
rust-project requires {arg} these days. No good giving people bad information even if it's not crucial to documenting this.
1 parent 35c3f73 commit 277cf5f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ config_data! {
474474

475475
/// Enables automatic discovery of projects using [`DiscoverWorkspaceConfig::command`].
476476
///
477-
/// [`DiscoverWorkspaceConfig`] also requires setting `progress_label` and `files_to_watch`.
478-
/// `progress_label` is used for the title in progress indicators, whereas `files_to_watch`
477+
/// [`DiscoverWorkspaceConfig`] also requires setting `progressLabel` and `filesToWatch`.
478+
/// `progressLabel` is used for the title in progress indicators, whereas `filesToWatch`
479479
/// is used to determine which build system-specific files should be watched in order to
480480
/// reload rust-analyzer.
481481
///
@@ -484,9 +484,10 @@ config_data! {
484484
/// "rust-analyzer.workspace.discoverConfig": {
485485
/// "command": [
486486
/// "rust-project",
487-
/// "develop-json"
487+
/// "develop-json",
488+
/// "{arg}"
488489
/// ],
489-
/// "progressLabel": "rust-analyzer",
490+
/// "progressLabel": "buck2/rust-project",
490491
/// "filesToWatch": [
491492
/// "BUCK"
492493
/// ]

docs/book/src/configuration_generated.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,9 +1552,10 @@ Below is an example of a valid configuration:
15521552
"rust-analyzer.workspace.discoverConfig": {
15531553
"command": [
15541554
"rust-project",
1555-
"develop-json"
1555+
"develop-json",
1556+
"{arg}"
15561557
],
1557-
"progressLabel": "rust-analyzer",
1558+
"progressLabel": "buck2/rust-project",
15581559
"filesToWatch": [
15591560
"BUCK"
15601561
]

0 commit comments

Comments
 (0)