LSP icon indicating copy to clipboard operation
LSP copied to clipboard

Cancel inflight view requests when the view closes or when the view state changes

Open rwols opened this issue 3 years ago • 2 comments

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

rwols avatar Oct 22 '20 20:10 rwols

We should cancel textDocument/documentHighlight when the selection changes.

rwols avatar Oct 25 '20 13:10 rwols

We now have an official client capability for this as well https://github.com/microsoft/language-server-protocol/commit/8aec48a51caf88e5c58cb082828abe028eb08396

rwols avatar Jan 18 '21 17:01 rwols