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:
parent
938c90fd3b
commit
903f92045a
7 changed files with 446 additions and 102 deletions
|
@ -369,9 +369,9 @@ impl ExtensionStore {
|
|||
let installed_dir = this.installed_dir.clone();
|
||||
async move {
|
||||
let (mut paths, _) = fs.watch(&installed_dir, FS_WATCH_LATENCY).await;
|
||||
while let Some(paths) = paths.next().await {
|
||||
for path in paths {
|
||||
let Ok(event_path) = path.strip_prefix(&installed_dir) else {
|
||||
while let Some(events) = paths.next().await {
|
||||
for event in events {
|
||||
let Ok(event_path) = event.path.strip_prefix(&installed_dir) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue