Serve definition from reflection provenance chains

reflection::definition_at returns the innermost covering entity's
first reflected-declaration link (else its first chain link), with a
registered test. The server serves textDocument/definition over a
recorded reflection snapshot and now advertises hover and definition
whenever a snapshot is loaded, not only with the occurrence observer.
A real stdio session resolved the splice site to the reflected
declaration range.
This commit is contained in:
faumaray committed 2026-12-06 02:20:22 +03:00
1 parent 1f01bcbfd5
commit 7e3ce6fc6c
6 files changed
+109 -9

No files matched your search

+5
View File
@@ -250,4 +250,9 @@ struct Position {
// than a lexical guess.
[[nodiscard]] std::optional<Hover> hover_at(const Snapshot &, std::string_view path, Position,
const Limits & = Limits{});
// Navigation target for the innermost entity covering POSITION: the first
// reflected-declaration link, else the first source link of its chain.
[[nodiscard]] std::optional<Range> definition_at(const Snapshot &, std::string_view path, Position,
const Limits & = Limits{});
} // namespace vls::reflection