Expand description
Hover (ADR-0091 Phase 3).
Given an LSP Position, find the smallest AST item whose span contains
the position and return a markdown hover with the item’s signature
followed by its /// docstring (rendered through gruel_doc).
Phase 3 covers top-level items (fn, struct, enum, interface,
derive, const, fields, variants, methods, parameters, type
references). Hover for arbitrary expressions / locals lands in Phase 4
when sema’s expr-type side-table is wired up.
Structs§
- Hover
Content - Hover content rendered to Markdown (plus the AST node’s span for the
returned LSP
Hover.rangefield).
Functions§
- hover_
at - Find an item under the cursor and produce hover content for it.
- hover_
at_ with_ expr_ types - Like
hover_at, but also consults the AIR expression-type side table. If the cursor is inside an expression whose type sema computed, we return the type as fallback hover content (Phase 4).