summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r--cli/lsp/language_server.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 316aabf91..2ccbb6284 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -58,7 +58,7 @@ pub struct LanguageServer {
#[derive(Debug, Clone, Default)]
pub struct StateSnapshot {
pub assets: Arc<Mutex<HashMap<ModuleSpecifier, Option<AssetDocument>>>>,
- pub documents: Arc<Mutex<DocumentCache>>,
+ pub documents: DocumentCache,
pub sources: Arc<Mutex<Sources>>,
}
@@ -289,7 +289,7 @@ impl LanguageServer {
pub fn snapshot(&self) -> StateSnapshot {
StateSnapshot {
assets: self.assets.clone(),
- documents: self.documents.clone(),
+ documents: self.documents.lock().unwrap().clone(),
sources: self.sources.clone(),
}
}