# lsp: Fix workspace diagnostics lag & add streaming support \(\#34022\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d7bb1c1d0e3d0f5d0c8a14df5b208decf71d1863)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d7bb1c1d0e3d0f5d0c8a14df5b208decf71d1863

Requested commit: d7bb1c1d0e3d0f5d0c8a14df5b208decf71d1863

Commit: d7bb1c1d0e3d0f5d0c8a14df5b208decf71d1863

Tree: 723f492b829a0e3b937328065bec24d7dddf3975

Author: teapo

Committer: GitHub

## Message

```
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.
```

## Parents

- [5f3e7a5f917b678755a84cca6495ca8a922cb072](https://git.cafe/gitcafe/zed/commit/5f3e7a5f917b678755a84cca6495ca8a922cb072?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d7bb1c1d0e3d0f5d0c8a14df5b208decf71d1863?format=markdown)
