summaryrefslogtreecommitdiff
path: root/cli/lsp/completions.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-03-29 16:25:48 -0400
committerGitHub <noreply@github.com>2023-03-29 16:25:48 -0400
commit89bbbd102c6050763105be39a49494a5ffdce35b (patch)
treec0b912058a193d12fc60fac91223e0fef9fc7637 /cli/lsp/completions.rs
parentbacbf949256e32ca84e7f11c0171db7d9a644b44 (diff)
refactor(lsp): remove boolean parameters on `documents.documents(...)` (#18493)
I think this makes things clearer at the call sites.
Diffstat (limited to 'cli/lsp/completions.rs')
-rw-r--r--cli/lsp/completions.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs
index ccb945a0b..cb8bd446d 100644
--- a/cli/lsp/completions.rs
+++ b/cli/lsp/completions.rs
@@ -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();