1
1
mirror of https://github.com/oxalica/nil.git synced 2024-11-27 00:06:26 +03:00

Handle workspace/didChangeWatchedFiles

This notification is sent unexpectedly by VSCode, observed in #24.
This commit is contained in:
oxalica 2022-10-04 05:06:55 +08:00
parent 2a9dcd5b15
commit 756be130c8

View File

@ -230,6 +230,12 @@ impl Server {
);
Ok(())
})?
.on_sync_mut::<notif::DidChangeWatchedFiles>(|_st, _params| {
// Workaround:
// > In former implementations clients pushed file events without the server actively asking for it.
// Ref: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWatchedFiles
Ok(())
})?
.finish()
}