Repository navigation
fix(editor): keep lsp failures from aborting editing - #423
Merged
Merged
Conversation
Contributor
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An unavailable language server can terminate the editor when a command such as
Korgdreturns an LSP error. Document synchronization can also propagate an error after the buffer has already changed, interrupting the rest of the edit notification.Handle LSP failures as warnings at the keyboard-command boundary and during document synchronization. Editing and plugin change notifications continue, and unrelated errors retain their existing handling. Add regressions for join, dot repeat, undo, and save after failed
didOpen/didChangecalls, plus hover and definition requests against a missing Markdown server.How to Test
scratch.mdwith four lines:alpha,beta,gamma, anddelta. Launch with:cargo run -- -c 'lsp.servers.markdown.command = "red-missing-language-server"' scratch.mdK, thengd. Each should show a language-server warning while leaving the editor open and the text unchanged. Before this fix,Kreproduced the fatalLSP protocol error: language server unavailableexit.Jj.: the buffer should containalpha betaandgamma delta. Pressuuto restore the four original lines, thenJand:wq. Confirm the joined first line is saved and Red exits normally.cargo test --test editing --test lsp_lazy --test lsp_save. The newjoining_lines_survives_lsp_sync_failure_and_remains_undoabletest injects both document-open and document-change failures;unavailable_markdown_lsp_does_not_abort_commands_or_later_editscovers a missing server executable.Validation
All 570 tests across those suites passed, along with formatting and
cargo clippy --all-targets --all-features -- -D warnings. Terminal checks confirmed thatJand the previously fatalKallow subsequent editing and saving.Local validation used temporary, uncommitted Wasmtime 48.0.5 and zip 9.0.3 pins because the configured registry could not resolve the production dependencies. Those pins are excluded from this PR; validation against the committed dependency set remains for CI.