diff options
Diffstat (limited to 'crates/ra_lsp_server/src/config.rs')
-rw-r--r-- | crates/ra_lsp_server/src/config.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/ra_lsp_server/src/config.rs b/crates/ra_lsp_server/src/config.rs index 71838b89c..5c5ae3e18 100644 --- a/crates/ra_lsp_server/src/config.rs +++ b/crates/ra_lsp_server/src/config.rs | |||
@@ -1,3 +1,5 @@ | |||
1 | use rustc_hash::FxHashMap; | ||
2 | |||
1 | use serde::{Deserialize, Deserializer}; | 3 | use serde::{Deserialize, Deserializer}; |
2 | 4 | ||
3 | /// Client provided initialization options | 5 | /// Client provided initialization options |
@@ -12,12 +14,6 @@ pub struct ServerConfig { | |||
12 | #[serde(deserialize_with = "nullable_bool_false")] | 14 | #[serde(deserialize_with = "nullable_bool_false")] |
13 | pub publish_decorations: bool, | 15 | pub publish_decorations: bool, |
14 | 16 | ||
15 | /// Whether or not the workspace loaded notification should be sent | ||
16 | /// | ||
17 | /// Defaults to `true` | ||
18 | #[serde(deserialize_with = "nullable_bool_true")] | ||
19 | pub show_workspace_loaded: bool, | ||
20 | |||
21 | pub exclude_globs: Vec<String>, | 17 | pub exclude_globs: Vec<String>, |
22 | 18 | ||
23 | pub lru_capacity: Option<usize>, | 19 | pub lru_capacity: Option<usize>, |
@@ -25,16 +21,19 @@ pub struct ServerConfig { | |||
25 | /// For internal usage to make integrated tests faster. | 21 | /// For internal usage to make integrated tests faster. |
26 | #[serde(deserialize_with = "nullable_bool_true")] | 22 | #[serde(deserialize_with = "nullable_bool_true")] |
27 | pub with_sysroot: bool, | 23 | pub with_sysroot: bool, |
24 | |||
25 | /// Fine grained feature flags to disable specific features. | ||
26 | pub feature_flags: FxHashMap<String, bool>, | ||
28 | } | 27 | } |
29 | 28 | ||
30 | impl Default for ServerConfig { | 29 | impl Default for ServerConfig { |
31 | fn default() -> ServerConfig { | 30 | fn default() -> ServerConfig { |
32 | ServerConfig { | 31 | ServerConfig { |
33 | publish_decorations: false, | 32 | publish_decorations: false, |
34 | show_workspace_loaded: true, | ||
35 | exclude_globs: Vec::new(), | 33 | exclude_globs: Vec::new(), |
36 | lru_capacity: None, | 34 | lru_capacity: None, |
37 | with_sysroot: true, | 35 | with_sysroot: true, |
36 | feature_flags: FxHashMap::default(), | ||
38 | } | 37 | } |
39 | } | 38 | } |
40 | } | 39 | } |