Skip to content

Use production editor regions for Java EOF completion in existing LSP - #254

Merged
opaopa6969 merged 9 commits into
masterfrom
feat/embedded-editor-regions
Oct 9, 2026
Merged

opaopa6969 merged 9 commits into
masterfrom
feat/embedded-editor-regions

Conversation

@opaopa6969

@opaopa6969 opaopa6969 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #253. Follows #252 and adopts opaopa6969/unlaxer-parser#476.

The existing opt-in P4 LSP uses the explicit production editor bridge for full-document updates and Java completion. Real CodeBlock parsing certifies bounded unfinished regions; diagnostic and completion edits map only to original text. Syntax failure in another formula no longer discards valid Java siblings. The same lifecycle lock protects the immutable source/version used by both requests. Outside owned Java regions, existing Tiny completion remains unchanged.

The branch includes current Tiny master 0d84f0d and supports its retained-source long fences as well as triple fences. Editor recognition may append a candidate closing fence to the parser input, but synthetic characters never enter source maps or edits. The strict bridge continues to reject unfinished input. The current grammar identity is recorded independently from the older fixed source pin used by parser PR #479's Java/Rust parity fixtures.

Validation: current default LSP/DAP 40 tests and opt-in profile 41 tests, with no skips; packaged existing launcher over stdio invokes real javac, publishes both production Java diagnostics, then returns Unicode/CRLF EOF completion target at line 3, characters 41–44. Tests cover current long-fence diagnostics at 2:49–54, long-fence EOF completion, opaque hash/backtick body text and strict failure after an unfinished-source edit. The paired parser PR independently verifies nine partial fixtures/29 observations and the original 177 production observations for Java/Rust at its documented fixed source revision.

The feature remains opt-in, disables annotation processing and executes no user code. Current root dependencies (Tiny 2.1.0, unlaxer 3.3.0-SNAPSHOT), default P4/ubnfc/DAP and strict CLI behavior are preserved. Foreign dependency diagnostics remain explicitly rejected by this single-document consumer. Revert restores diagnostic-only opt-in behavior without changing defaults.

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.

Use production editor regions for incomplete embedded Java diagnostics and completion

1 participant