-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
1 parent
19baabb
commit 4690890
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters