mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Centralize all config
This commit is contained in:
parent
1e012eb991
commit
a97e5eb85d
9 changed files with 153 additions and 330 deletions
|
@ -22,12 +22,22 @@ use crate::conv::{map_rust_diagnostic_to_lsp, MappedRustDiagnostic};
|
|||
|
||||
pub use crate::conv::url_from_path_with_drive_lowercasing;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum FlycheckConfig {
|
||||
CargoCommand { command: String, all_targets: bool, extra_args: Vec<String> },
|
||||
CustomCommand { command: String, args: Vec<String> },
|
||||
}
|
||||
|
||||
impl Default for FlycheckConfig {
|
||||
fn default() -> Self {
|
||||
FlycheckConfig::CargoCommand {
|
||||
command: "check".to_string(),
|
||||
all_targets: true,
|
||||
extra_args: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Flycheck wraps the shared state and communication machinery used for
|
||||
/// running `cargo check` (or other compatible command) and providing
|
||||
/// diagnostics based on the output.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue