mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Support setting cargo features
This commit is contained in:
parent
5eb5e80de9
commit
af4eb26645
8 changed files with 118 additions and 21 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use ra_project_model::CargoFeatures;
|
||||
use serde::{Deserialize, Deserializer};
|
||||
|
||||
/// Client provided initialization options
|
||||
|
@ -37,6 +38,9 @@ pub struct ServerConfig {
|
|||
|
||||
/// Fine grained feature flags to disable specific features.
|
||||
pub feature_flags: FxHashMap<String, bool>,
|
||||
|
||||
/// Cargo feature configurations.
|
||||
pub cargo_features: CargoFeatures,
|
||||
}
|
||||
|
||||
impl Default for ServerConfig {
|
||||
|
@ -49,6 +53,7 @@ impl Default for ServerConfig {
|
|||
max_inlay_hint_length: None,
|
||||
with_sysroot: true,
|
||||
feature_flags: FxHashMap::default(),
|
||||
cargo_features: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue