aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/config.rs4
-rw-r--r--crates/rust-analyzer/src/main_loop.rs1
-rw-r--r--crates/rust-analyzer/src/world.rs1
3 files changed, 6 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 3314269ec..a8bf29ddf 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -44,6 +44,9 @@ pub struct ServerConfig {
44 /// Fine grained feature flags to disable specific features. 44 /// Fine grained feature flags to disable specific features.
45 pub feature_flags: FxHashMap<String, bool>, 45 pub feature_flags: FxHashMap<String, bool>,
46 46
47 /// Fine grained controls for additional `OUT_DIR` env variables
48 pub additional_out_dirs: FxHashMap<String, String>,
49
47 pub rustfmt_args: Vec<String>, 50 pub rustfmt_args: Vec<String>,
48 51
49 /// Cargo feature configurations. 52 /// Cargo feature configurations.
@@ -64,6 +67,7 @@ impl Default for ServerConfig {
64 cargo_watch_all_targets: true, 67 cargo_watch_all_targets: true,
65 with_sysroot: true, 68 with_sysroot: true,
66 feature_flags: FxHashMap::default(), 69 feature_flags: FxHashMap::default(),
70 additional_out_dirs: FxHashMap::default(),
67 cargo_features: Default::default(), 71 cargo_features: Default::default(),
68 rustfmt_args: Vec::new(), 72 rustfmt_args: Vec::new(),
69 } 73 }
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 221f464b6..6d123f629 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -195,6 +195,7 @@ pub fn main_loop(
195 Watch(!config.use_client_watching), 195 Watch(!config.use_client_watching),
196 options, 196 options,
197 feature_flags, 197 feature_flags,
198 config.additional_out_dirs,
198 ) 199 )
199 }; 200 };
200 201
diff --git a/crates/rust-analyzer/src/world.rs b/crates/rust-analyzer/src/world.rs
index 6f394055a..ac4395617 100644
--- a/crates/rust-analyzer/src/world.rs
+++ b/crates/rust-analyzer/src/world.rs
@@ -76,6 +76,7 @@ impl WorldState {
76 watch: Watch, 76 watch: Watch,
77 options: Options, 77 options: Options,
78 feature_flags: FeatureFlags, 78 feature_flags: FeatureFlags,
79 additional_out_dirs: FxHashMap<String, String>,
79 ) -> WorldState { 80 ) -> WorldState {
80 let mut change = AnalysisChange::new(); 81 let mut change = AnalysisChange::new();
81 82