From fed52706def9a9f5d33edc7dd9848a02ae475ba5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 7 Jun 2019 20:49:29 +0300 Subject: make LRU cache configurable --- crates/ra_lsp_server/src/init.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'crates/ra_lsp_server/src/init.rs') 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 { /// Defaults to `true` #[serde(deserialize_with = "nullable_bool_true")] pub show_workspace_loaded: bool, + + pub lru_capacity: Option, } impl Default for InitializationOptions { fn default() -> InitializationOptions { - InitializationOptions { publish_decorations: false, show_workspace_loaded: true } + InitializationOptions { + publish_decorations: false, + show_workspace_loaded: true, + lru_capacity: None, + } } } @@ -54,8 +60,10 @@ mod test { assert_eq!(default, serde_json::from_str(r#"{}"#).unwrap()); assert_eq!( default, - serde_json::from_str(r#"{"publishDecorations":null, "showWorkspaceLoaded":null}"#) - .unwrap() + serde_json::from_str( + r#"{"publishDecorations":null, "showWorkspaceLoaded":null, "lruCapacity":null}"# + ) + .unwrap() ); } } -- cgit v1.2.3