diff options
Diffstat (limited to 'cli/lsp/analysis.rs')
-rw-r--r-- | cli/lsp/analysis.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs index ec8bd4a28..9f2c7ffc8 100644 --- a/cli/lsp/analysis.rs +++ b/cli/lsp/analysis.rs @@ -312,6 +312,16 @@ impl<'a> TsResponseImportMapper<'a> { if let Some(result) = import_map.lookup(&specifier, referrer) { return Some(result); } + if let Some(req_ref_str) = specifier.as_str().strip_prefix("jsr:") { + if !req_ref_str.starts_with('/') { + let specifier_str = format!("jsr:/{req_ref_str}"); + if let Ok(specifier) = ModuleSpecifier::parse(&specifier_str) { + if let Some(result) = import_map.lookup(&specifier, referrer) { + return Some(result); + } + } + } + } } return Some(spec_str); } |