lsp: Watch paths outside of worktrees at language servers request (#17499)

Another stab at https://github.com/zed-industries/zed/pull/17173, this
time fixing the segfault found in
https://github.com/zed-industries/zed/pull/17206

Release Notes:

- Improved language server reliability in multi-worktree projects and
monorepo. We now notify the language server more reliably about which
files have changed.
This commit is contained in:
Piotr Osiewicz 2024-09-06 15:47:17 +02:00 committed by GitHub
parent 938c90fd3b
commit 903f92045a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 446 additions and 102 deletions

View file

@ -169,7 +169,12 @@ impl SnippetProvider {
let (mut entries, _) = watcher.await;
while let Some(entries) = entries.next().await {
process_updates(this.clone(), entries, cx.clone()).await?;
process_updates(
this.clone(),
entries.into_iter().map(|event| event.path).collect(),
cx.clone(),
)
.await?;
}
Ok(())
})