Skip to content

fix: use UTF-16 positions in LSP - #88

Merged
vycdev merged 1 commit into
vycdev:mainfrom
vycdev2:fix/lsp-utf16-positions
Aug 10, 2026
Merged

fix: use UTF-16 positions in LSP#88
vycdev merged 1 commit into
vycdev:mainfrom
vycdev2:fix/lsp-utf16-positions

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • convert incoming LSP UTF-16 positions to the driver's Unicode-scalar columns for hover, definition, and completion queries
  • convert compiler byte spans to UTF-16 ranges for diagnostics and definition responses
  • advertise UTF-16 position encoding and cover supplementary characters, invalid surrogate positions, CRLF, and bounds

Verification

  • cargo test -q -p jett_lsp — passed: 5 tests
  • cargo build — passed
  • cargo test -q — passed: full workspace suite, including 432 driver fixtures
  • cargo fmt --check — passed
  • git diff --check — passed

Risk

  • Low: the change is isolated to the LSP adapter's coordinate boundary and invalid client positions return no result rather than being misinterpreted.

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

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