mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(lsp): refresh npm completions on each character (#20565)
This commit is contained in:
parent
2772d302f5
commit
9004117790
1 changed files with 4 additions and 3 deletions
|
@ -167,10 +167,11 @@ pub async fn get_import_completions(
|
|||
items: get_local_completions(specifier, &text, &range)?,
|
||||
}))
|
||||
} else if text.starts_with("npm:") {
|
||||
let items =
|
||||
get_npm_completions(specifier, &text, &range, npm_search_api).await?;
|
||||
Some(lsp::CompletionResponse::List(lsp::CompletionList {
|
||||
is_incomplete: false,
|
||||
items: get_npm_completions(specifier, &text, &range, npm_search_api)
|
||||
.await?,
|
||||
is_incomplete: !items.is_empty(),
|
||||
items,
|
||||
}))
|
||||
} else if !text.is_empty() {
|
||||
// completion of modules from a module registry or cache
|
||||
|
|
Loading…
Reference in a new issue