Skip to content

Commit

Permalink
Handle workspace/didChangeWatchedFiles
Browse files Browse the repository at this point in the history
This notification is sent unexpectedly by VSCode, observed in #24.
  • Loading branch information
oxalica committed Oct 3, 2022
1 parent 2a9dcd5 commit 756be13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/nil/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 756be13

Please sign in to comment.