Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruff server
: In 'publish diagnostics' mode, document diagnostics ar…
…e cleared properly when a file is closed (#11137) ## Summary Fixes #11114. As part of the `onClose` handler, we publish an empty array of diagnostics for the document being closed, similar to [`ruff-lsp`](https://github.com/astral-sh/ruff-lsp/blob/187d7790be0783b9ac41ce025a724cf389bf575c/ruff_lsp/server.py#L459-L464). This prevent phantom diagnostics from lingering after a document is closed. We'll only do this if the client doesn't support pull diagnostics, because otherwise clearing diagnostics is their responsibility. ## Test Plan Diagnostics should no longer appear for a document in the Problems tab after the document is closed.
- Loading branch information