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

Commit 7f3a119

Browse files
committed
Require build_on_save for build_command config option
1 parent fcbd932 commit 7f3a119

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/config.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ pub struct Config {
159159
pub show_hover_context: bool,
160160
/// EXPERIMENTAL (needs unstable features)
161161
/// If set, executes a given program responsible for rebuilding save-analysis
162-
/// to be loaded by the RLS. The program given should output a list of
162+
/// to be loaded by the RLS. The program given should output a list of
163163
/// resulting .json files on stdout.
164+
/// Currently also requires `build_on_save` to be set to true, since external
165+
/// commands have no insight into in-memory text buffers (unsaved files).
164166
pub build_command: Option<String>,
165167
}
166168

@@ -228,6 +230,9 @@ impl Config {
228230
self.build_lib = Inferrable::Inferred(false);
229231
self.cfg_test = false;
230232
self.build_command = None;
233+
} else if !self.build_on_save {
234+
self.build_command = None;
235+
eprintln!("`build_command` also requires enabled `build_on_save` option");
231236
}
232237
}
233238

0 commit comments

Comments
 (0)