aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/config.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-08-06 12:34:28 +0100
committerAleksey Kladov <[email protected]>2019-08-06 13:28:31 +0100
commitdeea8f52d9803bb8a93d5dbd935970a20f07a51e (patch)
tree989408695c8c7347d4c9e907cf3f8feff7f2a982 /crates/ra_lsp_server/src/config.rs
parent058c2daba1b81804d9f803e57c72f5702c124d9e (diff)
allow to exclude certain files and directories
Diffstat (limited to 'crates/ra_lsp_server/src/config.rs')
-rw-r--r--crates/ra_lsp_server/src/config.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/config.rs b/crates/ra_lsp_server/src/config.rs
index a16cc292e..6dcdc695a 100644
--- a/crates/ra_lsp_server/src/config.rs
+++ b/crates/ra_lsp_server/src/config.rs
@@ -1,7 +1,7 @@
1use serde::{Deserialize, Deserializer}; 1use serde::{Deserialize, Deserializer};
2 2
3/// Client provided initialization options 3/// Client provided initialization options
4#[derive(Deserialize, Clone, Copy, Debug, PartialEq, Eq)] 4#[derive(Deserialize, Clone, Debug, PartialEq, Eq)]
5#[serde(rename_all = "camelCase", default)] 5#[serde(rename_all = "camelCase", default)]
6pub struct ServerConfig { 6pub struct ServerConfig {
7 /// Whether the client supports our custom highlighting publishing decorations. 7 /// Whether the client supports our custom highlighting publishing decorations.
@@ -18,12 +18,19 @@ pub struct ServerConfig {
18 #[serde(deserialize_with = "nullable_bool_true")] 18 #[serde(deserialize_with = "nullable_bool_true")]
19 pub show_workspace_loaded: bool, 19 pub show_workspace_loaded: bool,
20 20
21 pub exclude_globs: Vec<String>,
22
21 pub lru_capacity: Option<usize>, 23 pub lru_capacity: Option<usize>,
22} 24}
23 25
24impl Default for ServerConfig { 26impl Default for ServerConfig {
25 fn default() -> ServerConfig { 27 fn default() -> ServerConfig {
26 ServerConfig { publish_decorations: false, show_workspace_loaded: true, lru_capacity: None } 28 ServerConfig {
29 publish_decorations: false,
30 show_workspace_loaded: true,
31 exclude_globs: Vec::new(),
32 lru_capacity: None,
33 }
27 } 34 }
28} 35}
29 36