support cancellation of requests from LSP
Summary:
We're familiar with requests from the client to LSP.
LSP can also issue requests, e.g. to show a dialog to the user and get a response back when the user clicks a button.
JsonRPC says that the sender of a request can cancel it while it's underway. It's clear how that should behave when the client made a request of the LSP server and wants to cancel it.
But what should happen when the LSP server makes a dialog-request and later cancels it? -- I think it should dismiss the dialog, and that will indeed support a nicer user experience. (VSCode does nothing; it ignores the cancellation).
This diff adds the basic support for cancellation.
Reviewed By: arxanas
Differential Revision:
D5220791
fbshipit-source-id:
2d231b4d76db9acd6d0bc7a90aa6f734596ffb05