mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
feat(vendor): support using an existing import map (#14836)
This commit is contained in:
parent
fc3a966a2d
commit
443041c23e
15 changed files with 1198 additions and 256 deletions
|
@ -208,8 +208,8 @@ fn get_base_import_map_completions(
|
|||
import_map: &ImportMap,
|
||||
) -> Vec<lsp::CompletionItem> {
|
||||
import_map
|
||||
.imports_keys()
|
||||
.iter()
|
||||
.imports()
|
||||
.keys()
|
||||
.map(|key| {
|
||||
// for some strange reason, keys that start with `/` get stored in the
|
||||
// import map as `file:///`, and so when we pull the keys out, we need to
|
||||
|
@ -253,7 +253,7 @@ fn get_import_map_completions(
|
|||
if !text.is_empty() {
|
||||
if let Some(import_map) = maybe_import_map {
|
||||
let mut items = Vec::new();
|
||||
for key in import_map.imports_keys() {
|
||||
for key in import_map.imports().keys() {
|
||||
// for some reason, the import_map stores keys that begin with `/` as
|
||||
// `file:///` in its index, so we have to reverse that here
|
||||
let key = if key.starts_with("file://") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue