diff options
Diffstat (limited to 'crates/ra_lsp_server/src/world.rs')
-rw-r--r-- | crates/ra_lsp_server/src/world.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index cd8df4fdb..f9ce570ca 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs | |||
@@ -46,7 +46,11 @@ pub struct WorldSnapshot { | |||
46 | } | 46 | } |
47 | 47 | ||
48 | impl WorldState { | 48 | impl WorldState { |
49 | pub fn new(folder_roots: Vec<PathBuf>, workspaces: Vec<ProjectWorkspace>) -> WorldState { | 49 | pub fn new( |
50 | folder_roots: Vec<PathBuf>, | ||
51 | workspaces: Vec<ProjectWorkspace>, | ||
52 | lru_capacity: Option<usize>, | ||
53 | ) -> WorldState { | ||
50 | let mut change = AnalysisChange::new(); | 54 | let mut change = AnalysisChange::new(); |
51 | 55 | ||
52 | let mut roots = Vec::new(); | 56 | let mut roots = Vec::new(); |
@@ -74,7 +78,7 @@ impl WorldState { | |||
74 | } | 78 | } |
75 | change.set_crate_graph(crate_graph); | 79 | change.set_crate_graph(crate_graph); |
76 | 80 | ||
77 | let mut analysis_host = AnalysisHost::default(); | 81 | let mut analysis_host = AnalysisHost::new(lru_capacity); |
78 | analysis_host.apply_change(change); | 82 | analysis_host.apply_change(change); |
79 | WorldState { | 83 | WorldState { |
80 | roots_to_scan, | 84 | roots_to_scan, |