Skip to content

fix: validate LSP documents on save - #126

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:feat/lsp-validate-on-save
Open

fix: validate LSP documents on save#126
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:feat/lsp-validate-on-save

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • advertise full document synchronization with save notifications so compliant LSP clients send textDocument/didSave
  • validate the current open document when an editor saves it
  • reuse the in-memory full-sync document text so save validation matches the latest known contents
  • leave unopened documents untouched and cover both save capability advertisement and save-text lookup with focused regressions

Verification

  • capability regression failed before the advertisement fix and passed afterward
  • cargo test -q -p jett_lsp — passed (5 tests)
  • cargo check --workspace — passed
  • cargo build --workspace — passed
  • cargo test -q — passed, including 432 driver fixtures
  • cargo fmt --all -- --check — passed
  • git diff --check — passed
  • cargo clippy -q -p jett_lsp --all-targets -- -D warnings — blocked by pre-existing warnings in jett_lexer (manual_is_multiple_of, unnecessary_map_or), outside this diff

Risk

  • Low: open/change synchronization retains full-document behavior; this explicitly enables and handles the standard save notification path.

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

Save-triggered validation is correct in isolation and the LSP tests passed, but this branch now conflicts with current main after #88 landed. Please rebase while preserving the UTF-16 position conversions. #116 (close cleanup) and #121 (stale-version suppression) are complementary backend changes and should be integrated serially rather than overwritten; rerun the full jett_lsp suite.

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.

2 participants