diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-05-29 01:26:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-29 01:26:43 +0100 |
commit | 14a74600de6f1c206ffe4750f6cb6da59657db8e (patch) | |
tree | ce593041af972fd31f83fa6b7b50458bc9f689dc /cli/lsp/documents.rs | |
parent | 2024c974b613f94f31559a1b32e2d747c2083e91 (diff) |
perf(lsp): lock out requests until init is complete (#23998)
Diffstat (limited to 'cli/lsp/documents.rs')
-rw-r--r-- | cli/lsp/documents.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs index b30217bcb..5a94daed7 100644 --- a/cli/lsp/documents.rs +++ b/cli/lsp/documents.rs @@ -1534,9 +1534,8 @@ mod tests { let temp_dir = TempDir::new(); let cache = LspCache::new(Some(temp_dir.uri())); let config = Config::default(); - 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()); (documents, cache, temp_dir) @@ -1684,9 +1683,8 @@ console.log(b, "hello deno"); ) .await; - let resolver = LspResolver::default() - .with_new_config(&config, &cache, None) - .await; + let resolver = + Arc::new(LspResolver::from_config(&config, &cache, None).await); documents.update_config(&config, &resolver, &cache, &workspace_files); // open the document @@ -1729,9 +1727,8 @@ console.log(b, "hello deno"); ) .await; - let resolver = LspResolver::default() - .with_new_config(&config, &cache, None) - .await; + let resolver = + Arc::new(LspResolver::from_config(&config, &cache, None).await); documents.update_config(&config, &resolver, &cache, &workspace_files); // check the document's dependencies |