diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-02-12 22:12:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 22:12:49 +0000 |
commit | 49d82e609f7da97f793900528e800019d502a2ff (patch) | |
tree | 9fd726bad9ba1d9f5bd416c2697eaab9321bfdbf /test_util/src/lsp.rs | |
parent | f60720090c7bd8cdf91d7aebd0c42e01c86b3b83 (diff) |
feat(lsp): jsr support first pass (#22382)
This implementation heavily depends on there being a lockfile, meaning
JSR specifiers will always diagnose as uncached unless it's there. In
practice this affects cases where a `deno.json` isn't being used. Our
NPM specifier support isn't subject to this.
The reason for this is that the version constraint solving code is
currently buried in `deno_graph` and not usable from the LSP, so the
only way to reuse that logic is the solved-version map in the lockfile's
`packages.specifiers`.
Diffstat (limited to 'test_util/src/lsp.rs')
-rw-r--r-- | test_util/src/lsp.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test_util/src/lsp.rs b/test_util/src/lsp.rs index 9b63b79cd..532cf1482 100644 --- a/test_util/src/lsp.rs +++ b/test_util/src/lsp.rs @@ -1,6 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use crate::deno_exe_path; +use crate::jsr_registry_url; use crate::npm_registry_url; use crate::PathRef; @@ -523,6 +524,7 @@ impl LspClientBuilder { command .env("DENO_DIR", deno_dir.path()) .env("NPM_CONFIG_REGISTRY", npm_registry_url()) + .env("DENO_REGISTRY_URL", jsr_registry_url()) // turn on diagnostic synchronization communication .env( "DENO_DONT_USE_INTERNAL_LSP_DIAGNOSTIC_SYNC_FLAG", |