Skip to content

ruff server should use textDocument/publishDiagnostics when pull diagnostics aren't supported #11059

@snowsignal

Description

@snowsignal

Right now, ruff server only uses pull diagnostics to send diagnostics to the client - they aren't pro-actively sent. This means that any LSP client that doesn't send a pull diagnostics request will not have visible diagnostics. This includes Neovim, Helix, and potentially others at the time of this writing, though Neovim will support pull diagnostics in the upcoming 0.10.0 release.

We should still support pull diagnostics going forward, but if they aren't supported (which the server will check using the client capabilities passed in) we should fall back to a publish diagnostics mode as an alternative.

Metadata

Metadata

Assignees

Labels

serverRelated to the LSP server

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions