mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Auto merge of #13128 - Veykril:invocation-strategy, r=Veykril
Implement invocation strategy config Fixes https://github.com/rust-lang/rust-analyzer/issues/10793 This allows to change how we run build scripts (and `checkOnSave`), exposing two configs: - `once`: run the specified command once in the project root (the working dir of the server) - `per_workspace`: run the specified command per workspace in the corresponding workspace This also applies to `checkOnSave` likewise, though `once_in_root` is useless there currently, due to https://github.com/rust-lang/cargo/issues/11007
This commit is contained in:
commit
a77ac93b2a
9 changed files with 471 additions and 207 deletions
|
@ -157,3 +157,10 @@ fn utf8_stdout(mut cmd: Command) -> Result<String> {
|
|||
let stdout = String::from_utf8(output.stdout)?;
|
||||
Ok(stdout.trim().to_string())
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
|
||||
pub enum InvocationStrategy {
|
||||
Once,
|
||||
#[default]
|
||||
PerWorkspace,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue