LSP
LSP copied to clipboard
Cancel inflight view requests when the view closes or when the view state changes
Is your feature request related to a problem? Please describe. When there is a request in flight for a particular view, say textDocument/documentSymbol, then the request is not cancelled when the view is closed.
Describe the solution you'd like Cancel any view-specific request with the $/cancel notification once:
- [ ] The view state changes (i.e. once the buffer is modified)
- [x] The view is closed
We should cancel textDocument/documentHighlight when the selection changes.
We now have an official client capability for this as well https://github.com/microsoft/language-server-protocol/commit/8aec48a51caf88e5c58cb082828abe028eb08396