summaryrefslogtreecommitdiff
path: root/cli/lsp/registries.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-12-15 13:23:43 -0500
committerGitHub <noreply@github.com>2021-12-15 13:23:43 -0500
commit6c324acf2363e88293ab94cf3de6c9d7a264b55d (patch)
treeb0d7c8752bf7e7b471be4a50e65572d501bb8b5a /cli/lsp/registries.rs
parenta1f0796fccfafee19b2fe06155efe746da2e9654 (diff)
feat: REPL import specifier auto-completions (#13078)
Diffstat (limited to 'cli/lsp/registries.rs')
-rw-r--r--cli/lsp/registries.rs20
1 files changed, 3 insertions, 17 deletions
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs
index 62a6aa987..afaefffd8 100644
--- a/cli/lsp/registries.rs
+++ b/cli/lsp/registries.rs
@@ -395,29 +395,14 @@ impl Default for ModuleRegistry {
// custom root.
let dir = deno_dir::DenoDir::new(None).unwrap();
let location = dir.root.join("registries");
- let http_cache = HttpCache::new(&location);
- let cache_setting = CacheSetting::RespectHeaders;
- let file_fetcher = FileFetcher::new(
- http_cache,
- cache_setting,
- true,
- None,
- BlobStore::default(),
- None,
- )
- .unwrap();
-
- Self {
- origins: HashMap::new(),
- file_fetcher,
- }
+ Self::new(&location)
}
}
impl ModuleRegistry {
pub fn new(location: &Path) -> Self {
let http_cache = HttpCache::new(location);
- let file_fetcher = FileFetcher::new(
+ let mut file_fetcher = FileFetcher::new(
http_cache,
CacheSetting::RespectHeaders,
true,
@@ -427,6 +412,7 @@ impl ModuleRegistry {
)
.context("Error creating file fetcher in module registry.")
.unwrap();
+ file_fetcher.set_download_log_level(super::logging::lsp_log_level());
Self {
origins: HashMap::new(),