Skip to content

re-publishDiagnostics after didOpen #20283

@ia0

Description

@ia0

rust-analyzer seems to only publishDiagnostics at startup and when the code changes. It seems other LSP servers like clangd additionally publishDiagnostics after didOpen. This saves LSP clients to store diagnostics for files that are not open.

What is rust-analyzer opinion about this? Should rust-analyzer support such (possibly optional) feature?

For context, eglot (the builtin LSP client implementation of Emacs) relies on LSP servers to publishDiagnostics after didOpen. I've opened a bug on their side too, ideally such that rust-analyzer can meet eglot somewhere: joaotavora/eglot#1531 (contains reproduction steps).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions