From 14a74600de6f1c206ffe4750f6cb6da59657db8e Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Wed, 29 May 2024 01:26:43 +0100 Subject: perf(lsp): lock out requests until init is complete (#23998) --- cli/lsp/diagnostics.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cli/lsp/diagnostics.rs') diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 5c982b0f3..35da778dc 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1629,9 +1629,8 @@ mod tests { .unwrap(); config.tree.inject_config_file(config_file).await; } - let resolver = LspResolver::default() - .with_new_config(&config, &cache, None) - .await; + let resolver = + Arc::new(LspResolver::from_config(&config, &cache, None).await); let mut documents = Documents::default(); documents.update_config(&config, &resolver, &cache, &Default::default()); for (specifier, source, version, language_id) in sources { -- cgit v1.2.3