From f75a17521df053218c0c2b5fb93c5354f9c8f274 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sat, 9 Sep 2023 19:37:01 +0100 Subject: fix(lsp): respect configured exclusions for testing APIs (#20427) LSP testing APIs now obey the various file inclusion settings: - Modules shown in the text explorer now respect the `exclude`, `test.exclude` and `test.include` fields in `deno.json`, as well as `deno.enablePaths` in VSCode settings. - Modules with testing code lens now respect the `"exclude"`, `test.exclude` and `test.include` fields in `deno.json`. Code lens already respects `deno.enablePaths`. --- cli/lsp/language_server.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/lsp/language_server.rs') diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 3b19d9288..7a69d8430 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -44,6 +44,7 @@ use super::client::Client; use super::code_lens; use super::completions; use super::config::Config; +use super::config::ConfigSnapshot; use super::config::SETTINGS_SECTION; use super::diagnostics; use super::diagnostics::DiagnosticServerUpdateMessage; @@ -157,6 +158,7 @@ pub struct LanguageServer(Arc>); pub struct StateSnapshot { pub assets: AssetsSnapshot, pub cache_metadata: cache::CacheMetadata, + pub config: Arc, pub documents: Documents, pub maybe_import_map: Option>, pub maybe_node_resolver: Option>, @@ -812,6 +814,7 @@ impl Inner { Arc::new(StateSnapshot { assets: self.assets.snapshot(), cache_metadata: self.cache_metadata.clone(), + config: self.config.snapshot(), documents: self.documents.clone(), maybe_import_map: self.maybe_import_map.clone(), maybe_node_resolver: Some(node_resolver), -- cgit v1.2.3