@@ -680,6 +680,9 @@ impl Registry {
680 Ok(client)
680 Ok(client)
683+ /// If this method is called, all documents that have a reference to language servers used by the language config have to refresh their language servers,
684+ /// as it could be that language servers of these documents were stopped by this method.
685+ /// See [helix_view::editor::Editor::refresh_language_servers]
683 pub fn restart(
686 pub fn restart(
684 &mut self,
687 &mut self,
685 language_config: &LanguageConfiguration,
688 language_config: &LanguageConfiguration,
@@ -707,8 +710,6 @@ impl Registry {
707 .insert(name.clone(), vec![client.clone()])
710 .insert(name.clone(), vec![client.clone()])
708 .unwrap();
711 .unwrap();
710− // TODO what if there are multiple instances for different workspaces?
711− // I think the language servers will be stopped without being restarted, which is not intended
712 for old_client in old_clients {
713 for old_client in old_clients {
713 tokio::spawn(async move {
714 tokio::spawn(async move {
714 let _ = old_client.force_shutdown().await;
715 let _ = old_client.force_shutdown().await;