help

package
v0.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package help renders nook's full-keymap overlay.

The host's status bar lists a single-line key reference, but that's reference, not discovery — users scanning the status bar miss the boundary between "ctrl+f search" and "ctrl+g git." This overlay groups every binding by job (Files, Editing, AI, Git, Terminal, LSP) and gives each one a single-sentence description. It's bound to `?` and dismissed by Esc or `?`.

The view is intentionally fixed-width (a card, not full-screen) so it reads like documentation, not a panel. The host centers it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func View

func View(t theme.Theme, width int) string

View renders the help card. Width is the available column count from the host (the card clamps to ~74 columns so the inner ladder lines up nicely regardless of terminal width).

Types

type Binding

type Binding struct {
	Key  string
	Desc string
}

Binding is a single key with its description. Key strings are rendered verbatim ("ctrl+p", "?", "esc"); descriptions are plain English.

type Section

type Section struct {
	Name     string
	Bindings []Binding
}

Section is a group of related bindings shown under a single header.

func Default

func Default() []Section

Default returns the canonical nook keymap. The order is intentional: navigation first (what people reach for in the first 30 seconds), AI in the middle (where the differentiation lives), then panes and miscellany. Update this list whenever a new binding lands in routeKey.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL