Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 9bd8d1c

Browse files
committed
build_command now implies build_on_save: true
1 parent 456bb56 commit 9bd8d1c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/config.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ pub struct Config {
164164
/// If set, executes a given program responsible for rebuilding save-analysis
165165
/// to be loaded by the RLS. The program given should output a list of
166166
/// resulting .json files on stdout.
167-
/// Currently also requires `build_on_save` to be set to true, since external
168-
/// commands have no insight into in-memory text buffers (unsaved files).
167+
///
168+
/// Implies `build_on_save`: true.
169169
pub build_command: Option<String>,
170170
}
171171

@@ -235,9 +235,8 @@ impl Config {
235235
self.cfg_test = false;
236236
self.rustfmt_path = None;
237237
self.build_command = None;
238-
} else if !self.build_on_save {
239-
self.build_command = None;
240-
eprintln!("`build_command` also requires enabled `build_on_save` option");
238+
} else if self.build_command.is_some() {
239+
self.build_on_save = true;
241240
}
242241
}
243242

0 commit comments

Comments
 (0)