fix(goto-file): fall back after unresolved document links - #16220
Open
yiheng-kkk wants to merge 1 commit into
Open
fix(goto-file): fall back after unresolved document links#16220yiheng-kkk wants to merge 1 commit into
yiheng-kkk wants to merge 1 commit into
Conversation
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.
Closes #15586.
Summary
goto_filecurrently treats any overlapping LSP document link as a complete match. If that link has no target and cannot be resolved, the built-in path fallback is skipped, sogfdoes nothing instead of opening a new buffer for the selected path.This change preserves document-link precedence while falling back when a link has no usable target:
target: Nonefall back after resolution;The fallback path is captured before the asynchronous resolve so it still reflects the selection that invoked
goto_file.Validation
cargo fmt --all -- --checkcargo check -p helix-term --features integrationgoto_fileintegration testscargo test --workspacecargo integration-test— 180 passedcargo clippy --workspace --all-targets -- -D warningsgit diff --checkThe test/build commands used Helix's supported
HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1setting with the repository grammars already cached, because GitHub was temporarily timing out while fetching one unrelated grammar.AI disclosure
This change was developed with assistance from OpenAI Codex. The final implementation, tests, asynchronous resolution semantics, repository history, and contribution policy were independently reviewed before submission.