Find the layer with the smallest enclosing node in language_scope_at

This commit is contained in:
Max Brunsfeld 2023-07-11 14:15:45 -07:00
parent bf9dfa3b51
commit 2e2333107a
6 changed files with 151 additions and 69 deletions

View file

@ -3045,6 +3045,8 @@ impl Project {
) -> Task<(Option<PathBuf>, Vec<WorktreeId>)> {
let key = (worktree_id, adapter_name);
if let Some(server_id) = self.language_server_ids.remove(&key) {
log::info!("stopping language server {}", key.1 .0);
// Remove other entries for this language server as well
let mut orphaned_worktrees = vec![worktree_id];
let other_keys = self.language_server_ids.keys().cloned().collect::<Vec<_>>();