Skip to main content

Module hover

Module hover 

Source
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§

HoverContent
Hover content rendered to Markdown (plus the AST node’s span for the returned LSP Hover.range field).

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).