editor: Cancel ongoing completion requests more eagerly (#12630)

Previously, we were:
- cancelling previous requests only after the latest one has completed
- always running the debounced documentation resolution to completion,
even when we had no need for it.

In this commit, we drop the ongoing completion requests as soon as the
new one is fired.
Fixes #5166 

Release Notes:

- Improved performance and reliability of completions in large
Typescript projects

Co-authored-by: Bennet Bo <bennet@zed.dev>
8e79609288Piotr Osiewicz committed on 6/4/2024, 10:22:01 AM· committed by GitHubparent47122a3
2 files changedLine totals unavailable