Skip to content

Commit f6959ec

Browse files
committed
fix: server restarting issue
1 parent 170a0c9 commit f6959ec

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/els/file_cache.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ impl FileCache {
8484
}
8585
}
8686

87+
#[allow(unused)]
8788
pub fn clear(&self) {
8889
self.files.borrow_mut().clear();
8990
self.editing.borrow_mut().clear();

crates/els/server.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,10 +741,11 @@ impl<Checker: BuildRunnable, Parser: Parsable> Server<Checker, Parser> {
741741
}
742742

743743
/// Restart the server. Clear caches and close & reopen channels.
744+
/// 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.
744745
#[allow(unused)]
745746
pub(crate) fn restart(&mut self) {
746747
lsp_log!("restarting ELS");
747-
self.file_cache.clear();
748+
// self.file_cache.clear();
748749
self.comp_cache.clear();
749750
if let Some(chan) = self.channels.as_ref() {
750751
chan.close();

0 commit comments

Comments
 (0)