Fix Cmd+click navigating to file instead of definition (#49012)
Wuji Chen
and
Claude Opus 4.6
created
## Summary
- Tighten `link_pattern_file_candidates` regex from `\(([^)]*)\)` to
`]\(([^)]*)\)` so only Markdown link syntax `[title](path)` triggers
path extraction from parentheses
- Prevents function call arguments like `do_work(file2)` from being
incorrectly resolved as file paths, which preempted LSP go-to-definition
Closes #48938
## Test plan
- [x] `cargo test -p editor hover_links` — all 12 tests pass
- [x] New unit tests verify: function calls don't extract arguments as
file candidates; Markdown links still extract correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Release Notes:
- Fixed Cmd+click navigating to file instead of definition in certain
cases
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>