Docs #
Small helpers for surfacing docstrings in the InfoView.
This is available through the widget entrypoint (import NN.Widgets) or
directly as import NN.Widgets.Core.Docs, since it depends on ProofWidgets.
Commands:
#tl_doc fprints the type + docstring forfas an info message.#tl_doc_view frenders the type + docstring forfas a rich HTML panel in the InfoView.
Tip: if you already have an identifier in the InfoView (e.g. under “Expected type”), you can also
hover it to see its type + docstring. InfoView hover tooltips can be toggled in VS Code under
Lean 4 > Infoview: Show Tooltip On Hover.
Main definitions #
#tl_doc f: printf's type and docstring in a plain info message.#tl_doc_view f: show the same information in a richer HTML panel.
Monospaced block that wraps long lines instead of scrolling, for signatures and docstrings.
Instances For
One declaration rendered as a card: name, type, and docstring, themed to the editor.
Instances For
Return the head constant name of an application, if one exists.
Instances For
Normalize optional docs into user-facing text.
Instances For
Pretty-print a declaration type using Lean's normal pretty-printer.
Instances For
Resolve an input term to a declaration name for doc lookup.