diff --git a/crates/els/file_cache.rs b/crates/els/file_cache.rs index d927893f..b8a20d11 100644 --- a/crates/els/file_cache.rs +++ b/crates/els/file_cache.rs @@ -84,6 +84,7 @@ impl FileCache { } } + #[allow(unused)] pub fn clear(&self) { self.files.borrow_mut().clear(); self.editing.borrow_mut().clear(); diff --git a/crates/els/server.rs b/crates/els/server.rs index 2d030ba7..dba5676b 100644 --- a/crates/els/server.rs +++ b/crates/els/server.rs @@ -741,10 +741,11 @@ impl Server { } /// Restart the server. Clear caches and close & reopen channels. + /// The server does not erase client-dependent information because it cannot notify the client of the restart and receive resources (such as workspace files) again. #[allow(unused)] pub(crate) fn restart(&mut self) { lsp_log!("restarting ELS"); - self.file_cache.clear(); + // self.file_cache.clear(); self.comp_cache.clear(); if let Some(chan) = self.channels.as_ref() { chan.close();