aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/init.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-12 11:36:47 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-12 11:36:47 +0100
commit03645c55761f8c9345ee3837a6010e65e7a80179 (patch)
tree9c24cb112429b0334762063e71a65a1907386e59 /crates/ra_lsp_server/src/init.rs
parent6296f51678843c96a4ab1f1e6784b6d69222e072 (diff)
parentfed52706def9a9f5d33edc7dd9848a02ae475ba5 (diff)
Merge #1382
1382: use salsa's LRU for syntax trees r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/init.rs')
-rw-r--r--crates/ra_lsp_server/src/init.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/init.rs b/crates/ra_lsp_server/src/init.rs
index 1b77e0312..b894b449d 100644
--- a/crates/ra_lsp_server/src/init.rs
+++ b/crates/ra_lsp_server/src/init.rs
@@ -17,11 +17,17 @@ pub struct InitializationOptions {
17 /// Defaults to `true` 17 /// Defaults to `true`
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
21 pub lru_capacity: Option<usize>,
20} 22}
21 23
22impl Default for InitializationOptions { 24impl Default for InitializationOptions {
23 fn default() -> InitializationOptions { 25 fn default() -> InitializationOptions {
24 InitializationOptions { publish_decorations: false, show_workspace_loaded: true } 26 InitializationOptions {
27 publish_decorations: false,
28 show_workspace_loaded: true,
29 lru_capacity: None,
30 }
25 } 31 }
26} 32}
27 33
@@ -54,8 +60,10 @@ mod test {
54 assert_eq!(default, serde_json::from_str(r#"{}"#).unwrap()); 60 assert_eq!(default, serde_json::from_str(r#"{}"#).unwrap());
55 assert_eq!( 61 assert_eq!(
56 default, 62 default,
57 serde_json::from_str(r#"{"publishDecorations":null, "showWorkspaceLoaded":null}"#) 63 serde_json::from_str(
58 .unwrap() 64 r#"{"publishDecorations":null, "showWorkspaceLoaded":null, "lruCapacity":null}"#
65 )
66 .unwrap()
59 ); 67 );
60 } 68 }
61} 69}