Skip to content

feat(nvim): full-screen keybinding cheatsheet + release v3.0.0#130

Merged
Gerrrt merged 3 commits into
mainfrom
claude/nvchad-cheatsheet-expansion-fioord
Jul 2, 2026
Merged

feat(nvim): full-screen keybinding cheatsheet + release v3.0.0#130
Gerrrt merged 3 commits into
mainfrom
claude/nvchad-cheatsheet-expansion-fioord

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What & why

which-key is great at "I pressed <leader>, now what?" — but useless for "what
do I even have?"
. The config's ~30 lazy plugin specs have accreted features
faster than muscle memory can track, so this adds the other half: one
full-screen panel that lays out every curated binding at once
, so you can
eyeball the whole surface area and rediscover what you're under-using.

And since this is a user-visible interface change that repoints a public binding,
it's the cut for v3.0.0.

The cheatsheet — nvim/lua/gerrrt/cheatsheet.lua

  • Centered, NVChad-style floating panel of task-grouped cards — Essentials,
    Motion & Search, Flash, Windows/Splits, Buffers, Tabs, Harpoon, Find (fzf),
    LSP & Code, Trouble, the three Git groups, Debug (DAP), Test, Search & Replace,
    Folds, Text objects & Surround, Sessions, UI & Toggles, Packages.
  • Masonry layout: cards pack shortest-column-first into as many columns as the
    terminal is wide, so it stays rectangular from a 3-column laptop to a 5-column
    ultrawide.
  • Themed via default = true highlight links (Title / Constant / Comment), so
    it inherits tokyonight here and still reads correctly on a bare box.
  • Pure Neovim API — no new plugin dependency; require-d lazily so it costs
    nothing at startup.
  • Hand-curated on purpose. Most mappings bind lazily and aren't registered
    until their plugin loads, so scraping nvim_get_keymap() at open time would
    show a half-empty, load-order-dependent list. The table is the intentional,
    always-complete picture and lives beside the specs it mirrors, so a new binding
    gets a new row in the same review.

Entry points

  • <leader>? or :Cheatsheet / :Cheat to open; q / <Esc> to close.
  • ⚠️ Breaking: <leader>? previously opened which-key's buffer-local-keys
    popup. That popup moves to <leader>wk (now under a labelled w group). The
    whole map is the more useful thing to keep on the mnemonic "help" key; the live
    per-buffer prompt is one keystroke away.

Release v3.0.0

  • core.version 2.6.0 → 3.0.0; CHANGELOG [Unreleased] promoted under
    ## [v3.0.0] - 2026-07-02 (fresh empty [Unreleased] opened).
  • MAJOR per RELEASE-STRATEGY.md's SemVer mapping: repointing a public binding
    is a breaking change a host adapts to. Rides alongside the additive cheatsheet
    and the already-staged starship-timeout / repo-migration changes.

After merge, finish the tag per RELEASE-RUNBOOK.md §1 (git tag -fa v3.0.0 origin/main + move the v3 alias) so sync-fanout vendors it to the OS repos.

Verification

  • luacheck clean across all 86 nvim/ files; markdownlint clean on CHANGELOG.
  • ./scripts/audit-core.sh186 pass / 0 fail (skips are only tools absent in
    this container: zsh, shellcheck, actionlint, gitleaks, and the headless-nvim
    legs — all gated in CI).
  • Render logic exercised headlessly against a stubbed vim API: 44 lines, 176
    highlight spans, 0 byte-offset overflows (valid even across the multibyte
    box-drawing rules), masonry balanced across columns.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 2, 2026 05:42
which-key answers "I pressed <leader>, what's next?" but not "what do I even
have?" — so the config's ~30 lazy plugin specs accreted features faster than
muscle memory could track. Add lua/gerrrt/cheatsheet.lua: a centered, NVChad-
style floating panel that lays out every curated binding at once in task-grouped
cards, masonry-packed into as many columns as the terminal is wide and themed
via `default = true` highlight links so it degrades cleanly on a bare box.

Bound to <leader>? (which-key's old buffer-local-keys popup moves to <leader>wk,
now under a labelled `w` group) and exposed as :Cheatsheet / :Cheat; q/<Esc>
close. Pure Neovim API, no new plugin dependency, require-d lazily so it costs
nothing at startup. Hand-curated on purpose: most mappings bind lazily and
aren't registered until their plugin loads, so scraping nvim_get_keymap() at
open time would show a half-empty, load-order-dependent list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEMuYnYhX6vzBYcQVzGm9U
Bump core.version 2.6.0 → 3.0.0 and promote CHANGELOG [Unreleased] under a dated
## [v3.0.0] heading. MAJOR because <leader>? changes behavior — a public-binding
repoint (per RELEASE-STRATEGY.md's SemVer mapping) — alongside the additive
cheatsheet and the staged starship/repo-migration changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEMuYnYhX6vzBYcQVzGm9U
Copilot AI review requested due to automatic review settings July 2, 2026 05:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Neovim “full-screen keybinding cheatsheet” UI and repoints the existing <leader>? help binding to open it, cutting a major v3.0.0 release to reflect the breaking keybinding change.

Changes:

  • Introduce gerrrt.cheatsheet module that renders a floating, multi-column keybinding panel.
  • Rewire keybinding entry points: <leader>? opens the cheatsheet; which-key buffer-local popup moves to <leader>wk.
  • Bump core.version to 3.0.0 and promote changelog entries under v3.0.0.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
nvim/lua/gerrrt/plugins/which-key.lua Adds a which-key group and moves buffer-local which-key popup to <leader>wk.
nvim/lua/gerrrt/config/keymaps.lua Binds <leader>? to open the cheatsheet and adds :Cheatsheet / :Cheat commands.
nvim/lua/gerrrt/cheatsheet.lua New module implementing the cheatsheet UI + rendering/layout logic.
core.version Version bump to 3.0.0 for the breaking binding change.
CHANGELOG.md Adds v3.0.0 entry documenting the cheatsheet and keybinding repoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +23 to +25
vim.api.nvim_create_user_command("Cheatsheet", function()
require("gerrrt.cheatsheet").open()
end, { desc = "Open the keybinding cheatsheet" })

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this (and the :Cheat twin) as-is. Unlike the :command Ex command, nvim_create_user_command defaults to force = true — it silently overwrites an existing command of the same name, so re-sourcing won't error. (It also isn't sourced on reload here: keymaps.lua is required once at startup, and require is cached.) Applied the other two comments — added <leader>wk to the cheatsheet table and clamped the float's inner size to columns-4/lines-4 so the rounded border can't overflow a tiny terminal — in 7c388ee.


Generated by Claude Code

Comment on lines +26 to +28
vim.api.nvim_create_user_command("Cheat", function()
require("gerrrt.cheatsheet").open()
end, { desc = "Open the keybinding cheatsheet" })
Comment on lines +24 to +33
{
"Essentials",
{ "<leader>?", "Open this cheatsheet" },
{ "<leader>rc", "Edit init.lua" },
{ "<Esc>", "Clear search highlight" },
{ "<leader>pa", "Copy full file path" },
{ "<leader>p", "Paste over, keep yank (x)" },
{ "<leader>D", "Delete to black hole" },
{ "gc / gcc", "Comment motion / line" },
},
Comment thread nvim/lua/gerrrt/cheatsheet.lua Outdated
Comment on lines +377 to +384
local width = math.min(content_w, vim.o.columns - 2)
local height = math.min(#lines, math.floor(vim.o.lines * 0.9))
local win = vim.api.nvim_open_win(buf, true, {
relative = "editor",
width = width,
height = height,
row = math.floor((vim.o.lines - height) / 2),
col = math.floor((vim.o.columns - width) / 2),
Address PR review:
- The cheatsheet bills itself as the always-complete map but omitted the
  <leader>wk binding it introduced (which-key's relocated buffer-local popup).
  Add it to the Essentials card so the table stays in sync with the keymaps.
- The rounded border makes the float 2 cells wider/taller than width×height, so
  on a tiny terminal `height = floor(lines*0.9)` could exceed the grid and make
  nvim_open_win error. Clamp inner size to columns-4 / lines-4 (border + margin);
  verified an 8×40 grid now yields a 4×36 float that fits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEMuYnYhX6vzBYcQVzGm9U
@Gerrrt Gerrrt merged commit 2f645e3 into main Jul 2, 2026
14 checks passed
@Gerrrt Gerrrt deleted the claude/nvchad-cheatsheet-expansion-fioord branch July 2, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants