Skip to content

fix: Expose related information diagnostics#13695

Draft
wvhulle wants to merge 2 commits into
leanprover:masterfrom
wvhulle:expose-related-information-diagnostics
Draft

fix: Expose related information diagnostics#13695
wvhulle wants to merge 2 commits into
leanprover:masterfrom
wvhulle:expose-related-information-diagnostics

Conversation

@wvhulle
Copy link
Copy Markdown

@wvhulle wvhulle commented May 10, 2026

This PR exposes the relatedInformation field standardized in the official LSP protocol to users outside of Lean core. This allows users to implement Lean linters that show additional labels in editors besides the main diagnostic.

Pulls these LSP types into their own prelude-friendly modules so
downstream code (linters, widget bridges) can depend on them without
importing the full Diagnostics module.
@wvhulle wvhulle changed the title Expose related information diagnostics fix: Expose related information diagnostics May 10, 2026
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label May 10, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2026-05-02 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2026-05-10 10:59:26)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-05-02 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-05-10 10:59:28)

Add two optional fields to BaseMessage so message producers can attach
LSP `Diagnostic.relatedInformation` items and a JSON-encoded `Diagnostic.data?`
payload (consumed by the diagnostic-hover infrastructure).
@wvhulle wvhulle force-pushed the expose-related-information-diagnostics branch from 66b3a8e to b02992f Compare May 10, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants