Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 8c1db649..4aabbe7a 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -1058,8 +1058,21 @@ impl Application {
continue;
}
};
+ for watch in &ops.watchers {
+ if let lsp::GlobPattern::Relative(pattern) =
+ &watch.glob_pattern
+ {
+ let base_url = match &pattern.base_uri {
+ lsp::OneOf::Left(folder) => &folder.uri,
+ lsp::OneOf::Right(url) => url,
+ };
+ let Ok(base_dir) = base_url.to_file_path() else {
+ continue;
+ };
+ self.editor.file_watcher.add_root(&base_dir);
+ }
+ }
self.editor.language_servers.file_event_handler.register(
- client.id(),
Arc::downgrade(client),
reg.id,
ops,