feat: correctly fallback to notify if the clinet-side file watching is not supported
This commit is contained in:
parent
3d63abf1d8
commit
b9417f3483
@ -723,7 +723,10 @@ pub fn files(&self) -> FilesConfig {
|
||||
FilesConfig {
|
||||
watcher: match self.data.files_watcher.as_str() {
|
||||
"notify" => FilesWatcher::Notify,
|
||||
"client" | _ => FilesWatcher::Client,
|
||||
"client" if self.did_change_watched_files_dynamic_registration() => {
|
||||
FilesWatcher::Client
|
||||
}
|
||||
_ => FilesWatcher::Notify,
|
||||
},
|
||||
exclude: self.data.files_excludeDirs.iter().map(|it| self.root_path.join(it)).collect(),
|
||||
}
|
||||
|
@ -241,7 +241,6 @@ fn eq_ignore_build_data<'a>(
|
||||
}
|
||||
|
||||
if let FilesWatcher::Client = self.config.files().watcher {
|
||||
if self.config.did_change_watched_files_dynamic_registration() {
|
||||
let registration_options = lsp_types::DidChangeWatchedFilesRegistrationOptions {
|
||||
watchers: self
|
||||
.workspaces
|
||||
@ -257,10 +256,7 @@ fn eq_ignore_build_data<'a>(
|
||||
]
|
||||
})
|
||||
})
|
||||
.map(|glob_pattern| lsp_types::FileSystemWatcher {
|
||||
glob_pattern,
|
||||
kind: None,
|
||||
})
|
||||
.map(|glob_pattern| lsp_types::FileSystemWatcher { glob_pattern, kind: None })
|
||||
.collect(),
|
||||
};
|
||||
let registration = lsp_types::Registration {
|
||||
@ -273,7 +269,6 @@ fn eq_ignore_build_data<'a>(
|
||||
|_, _| (),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let mut change = Change::new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user