mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
refactor(lsp): remove boolean parameters on documents.documents(...)
(#18493)
I think this makes things clearer at the call sites.
This commit is contained in:
parent
bacbf94925
commit
89bbbd102c
6 changed files with 64 additions and 43 deletions
|
@ -3,6 +3,7 @@
|
|||
use super::client::Client;
|
||||
use super::config::ConfigSnapshot;
|
||||
use super::documents::Documents;
|
||||
use super::documents::DocumentsFilter;
|
||||
use super::lsp_custom;
|
||||
use super::registries::ModuleRegistry;
|
||||
use super::tsc;
|
||||
|
@ -278,7 +279,7 @@ fn get_import_map_completions(
|
|||
if let Ok(resolved) = import_map.resolve(&key, specifier) {
|
||||
let resolved = resolved.to_string();
|
||||
let workspace_items: Vec<lsp::CompletionItem> = documents
|
||||
.documents(false, true)
|
||||
.documents(DocumentsFilter::AllDiagnosable)
|
||||
.into_iter()
|
||||
.filter_map(|d| {
|
||||
let specifier_str = d.specifier().to_string();
|
||||
|
@ -460,7 +461,7 @@ fn get_workspace_completions(
|
|||
documents: &Documents,
|
||||
) -> Vec<lsp::CompletionItem> {
|
||||
let workspace_specifiers = documents
|
||||
.documents(false, true)
|
||||
.documents(DocumentsFilter::AllDiagnosable)
|
||||
.into_iter()
|
||||
.map(|d| d.specifier().clone())
|
||||
.collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue