lsp: Fix workspace diagnostics lag & add streaming support (#34022)

Closes https://github.com/zed-industries/zed/issues/33980
Closes https://github.com/zed-industries/zed/discussions/33979

- Switches to the debounce task pattern for diagnostic summary
computations, which most importantly lets us do them only once when a
large number of DiagnosticUpdated events are received at once.
- Makes workspace diagnostic requests not time out if a partial result
is received.
- Makes diagnostics from workspace diagnostic partial results get
merged.

There might be some related areas where we're not fully complying with
the LSP spec but they may be outside the scope of what this PR should
include.

Release Notes:

- Added support for streaming LSP workspace diagnostics.
- Fixed editor freeze from large LSP workspace diagnostic responses.
This commit is contained in:
teapo 2025-07-15 17:41:45 +02:00 committed by GitHub
parent 5f3e7a5f91
commit d7bb1c1d0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 460 additions and 114 deletions

1
Cargo.lock generated
View file

@ -3168,6 +3168,7 @@ dependencies = [
"session",
"settings",
"sha2",
"smol",
"sqlx",
"strum 0.27.1",
"subtle",