Skip to content

fix: clear stale LSP diagnostics on document close - #116

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/lsp-clear-diagnostics
Open

fix: clear stale LSP diagnostics on document close#116
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/lsp-clear-diagnostics

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Clear published diagnostics when an LSP document is closed so editors do not retain stale errors.
  • Extract diagnostic-to-LSP mapping into a tested helper.

Verification

  • cargo fmt --all -- --check — passed
  • cargo check -q — passed
  • cargo build -q — passed
  • cargo test -q -p jett_lsp — passed (4 tests)
  • cargo test -q — passed (all workspace tests)
  • git diff --check — passed

Risk

  • Low: document-close handling now publishes the standard empty diagnostic list; compilation and existing LSP behavior are unchanged.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

vycdev commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Clearing diagnostics on document close is correct and the LSP tests passed, but this branch now conflicts with current main after the UTF-16 LSP position work in #88 landed. Please rebase without regressing the scalar/UTF-16 conversions, then rerun the full jett_lsp tests. The complementary #121/#126 changes must be serialized afterward because they touch the same backend state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants