lsp: Refresh `textDocument/diagnostic` on `workspace/diagnostic/refresh` (#45365)
Per LSP spec, when receiving `workspace/diagnostic/refresh`, clients
should refresh all pulled diagnostics including both workspace and
document diagnostics[^1]. Previously, only workspace diagnostics were
refreshed.
[^1]:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#diagnostic_refresh
This adds `pull_document_diagnostics_for_server()`, which refreshes
`textDocument/diagnostic` for all open buffers associated with the
given language server.
Closes #ISSUE
Release Notes:
- When handling `workspace/diagnostic/refresh`, Zed now also sends new
`textDocument/diagnostic` requests for open files, aligning with the LSP
specification.
---------
Co-authored-by: John Tur <john-tur@outlook.com>
3387021dffShuhei Kadowaki committed on 1/7/2026, 1:35:39 AM· committed by GitHubparentff73a91