editor: Stop re-requesting hover and definitions for the same position (#58244)

Holding the go-to-definition modifier (`cmd`/`ctrl`) and moving the
mouse re-issued a `textDocument/definition` request on every mouse-move
event for the same cursor position, because the request deduplication
guard had gone stale, namely:

* `HoveredLinkState::last_trigger_point` was only set when the state was
first created, so the guard for the checking the same position stopped
matching after the first request. It's now refreshed whenever a
definition request is issued, so keeping the mouse on a symbol queries
once instead of on every move. This matters for servers that return a
bare `Location` without an `originSelectionRange` (e.g. phpactor), where
the other guard (`symbol_range`) stays empty and deduplication relies
entirely on `last_trigger_point`.
* The `HoverState::triggered_from` field was dead code, as it was never
written to, so these changes also remove it. The hover-popover path is
already throttled by its show delay, so each mouse move cancels the
pending request before it is sent, with no extra guard needed.

Closes #56193

Release Notes:

- Fixed go to definition repeatedly querying the language server for the
same cursor position

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
f8cfad3420Veesh Goldman committed on 6/2/2026, 10:00:27 PM· committed by GitHubparenta565ab4
2 files changedLine totals unavailable