Skip to main content

Module help

Module help 

Source
Expand description

help-mode – minor mode that turns a markdown buffer into a help buffer (DESIGN.md §5.11). Composes with markdown-mode (the major), which carries the syntax pipeline + motion semantics. Help-mode adds:

  • ReadOnly = true (option contribution).
  • Link / anchor metadata parsing (today carried on the HelpContent bundle; future: contributed by help-mode’s on_activate).
  • <CR> follow-link dispatch (gated on this minor being active).
  • The :help / :describe-* / :apropos / :keymap / etc. workflow commands (gated on this minor being active).

Decoupling stance (M.4): the popup UI component is buffer- agnostic. It can render any buffer; help-mode-tagged buffers just happen to be the only popup content kind today. The user’s display preference (popup / split / tab / minibuffer) is orthogonal to which mode the buffer carries.

Structs§

HelpMode
help-mode — the minor that makes a (markdown-major) buffer a help buffer: read-only, gutterless, no-file, <Esc> dismisses it, and its motions run through the read-only help invocation runner. Activated by the host on :help / :describe-* / :apropos / :keymap / … views; see the module docs.

Functions§

register_help_mode_actions
Register help-mode’s action:help-dismiss command so translate_mode_keymaps can resolve the <Esc> binding’s cmd name. Its body emits [Effect::DismissPopup]; the host resolves HOW to dismiss (close the help-owned split pane, dismiss a floating popup, or restore the buffer active-pane help displaced) — the mode owns the chord + the decision, the pane/popup mechanism stays host-side behind the effect boundary. Called at boot beside register_repl_mode_actions while the registry is mutable; an unresolvable name would drop the whole binding with a warn.