From 49d82e609f7da97f793900528e800019d502a2ff Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Mon, 12 Feb 2024 22:12:49 +0000 Subject: 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`. --- test_util/src/lsp.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test_util/src') 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", -- cgit v1.2.3