chore(nvim): close cheatsheet gaps, name which-key prefixes, drop dead config#259
Conversation
…d config
Documentation drift and dead plugin config found by a second review pass. No
behaviour changes beyond the harpoon guard.
CHEATSHEET. The panel claims to lay out every curated binding; an audit against
the real keymaps found it did not. Added a Completion (blink.cmp) card — the
seven completion-menu keys had no row at all — and a Move lines (mini.move) card
for <A-hjkl>, another whole feature that was missing. Added <leader>bn/bp,
<leader>cl (Trouble LSP refs/defs), ]t/[t, gsh and gsn. Corrected two
descriptions: <leader>rc said "Edit init.lua" where the keymap's desc is "Edit
config", and <leader>e dropped the load-bearing "closes Zen if active" side
effect. The header's completeness claim is now scoped to state what is
deliberately excluded (transient-UI keys) instead of overstating.
WHICH-KEY. <leader>r, <leader>o and <leader>p had real children but no group
entry, so they rendered as bare unnamed prefixes. <leader>p is declared for
normal mode only — in visual it is itself a mapping (paste-without-yank), not a
prefix.
DEAD CONFIG, each checked against the installed plugin source rather than
assumed:
• bufferline hover.reveal = { "close" } was unreachable — get_close_icon()
(ui.lua:263-270) consults reveal and then unconditionally bails on
`if not options.show_buffer_close_icons then return end`, which is false
here. hover stays on for hover highlighting.
• nvim-tree view.adaptive_size is a 2023-01-15 legacy key silently rewritten
by legacy.lua:73-81; with no explicit width it yields { min = nil } i.e. {}.
Verified equivalent by running the migration and comparing deep-equal, then
written in the current spelling.
• fidget winblend 0 -> 100 (its default). The old comment claimed 0 matched
"transparent floats"; fidget's own docs describe 100 as the see-through
setting and anything less as blending with what is underneath.
• nvim-treesitter-context separator = nil did nothing: nil in a table literal
omits the key and nil is already the default.
• conform's config function re-implemented lazy.nvim's default for a spec with
opts. Verified the 20 formatters_by_ft entries still apply without it.
• blink.cmp comment claimed the snippet keys use native vim.snippet; with
preset = "luasnip" they route to LuaSnip.
HARPOON. <leader>ha on an unnamed buffer stored an unnavigable empty entry and
toasted a bare "Harpoon: added ". It now refuses with a warning.
Validated: luacheck 0/0 across 86 files, clean headless boot, cheatsheet opens
and renders all new cards, the seven changed plugins force-load with no errors,
make audit 222 pass / 0 fail.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018wpwbjkGJKPFgvBFEKsFWE
There was a problem hiding this comment.
Pull request overview
Aligns Neovim documentation and plugin configuration with current behavior while preventing invalid Harpoon entries.
Changes:
- Expands the cheatsheet and names missing which-key prefixes.
- Removes redundant or legacy plugin configuration.
- Rejects unnamed buffers when adding Harpoon entries.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
CHANGELOG.md |
Records Neovim changes. |
nvim/lua/gerrrt/cheatsheet.lua |
Adds missing binding references. |
nvim/lua/gerrrt/plugins/blink-cmp.lua |
Corrects snippet-engine commentary. |
nvim/lua/gerrrt/plugins/bufferline-nvim.lua |
Removes unreachable hover reveal configuration. |
nvim/lua/gerrrt/plugins/conform.lua |
Uses lazy.nvim’s default setup behavior. |
nvim/lua/gerrrt/plugins/fidget-nvim.lua |
Restores the default transparent window blend. |
nvim/lua/gerrrt/plugins/harpoon.lua |
Guards against unnamed buffers. |
nvim/lua/gerrrt/plugins/nvim-tree.lua |
Replaces a legacy adaptive-width option. |
nvim/lua/gerrrt/plugins/treesitter-context.lua |
Removes an ineffective nil option. |
nvim/lua/gerrrt/plugins/which-key.lua |
Names three previously unnamed prefixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { "<C-e>", "Hide menu" }, | ||
| { "<C-b> / <C-f>", "Scroll docs up / down" }, | ||
| { "<Tab> / <S-Tab>", "Snippet: next / prev placeholder" }, | ||
| { "<C-s>", "Signature help (insert)" }, |
| -- (nvim-tree.lua/lua/nvim-tree/legacy.lua:73-81): with no explicit width it produces | ||
| -- `width = { min = nil }`, i.e. exactly `{}`. Verified equivalent by running the | ||
| -- migration: `{ adaptive_size = true }` and `{ width = {} }` compare deep-equal. | ||
| -- An empty width table means "size to content, no fixed min/max". |
…{} note
Both review comments on #259. Both were mistakes I introduced in that PR.
<C-s> does not belong in the Completion card. It is signature help, mapped in
utils/lsp.lua:121 — there are zero hits for it in blink's keymap block, which
ends at <S-Tab>. It was already listed in the LSP & Code card, so the new row
both duplicated it and contradicted that card's own note that every key in it is
set explicitly in the blink spec. Removed, with a comment recording why it is
not there (blink's signature window is automatic via signature.enabled and has
no key of its own). The two remaining <C-s> rows are distinct: Flash in
command-line search, and signature help in insert.
`view = { width = {} }` is not "no fixed min/max". The migration equivalence
still holds, but the explanation was wrong: nvim-tree fills the absent keys with
its own defaults — `width.min or DEFAULT_MIN_WIDTH` (30) and
`width.max or DEFAULT_MAX_WIDTH` (-1) at view-state.lua:5-6,77-78 — so the pane
sizes to content but never narrower than 30 columns. Confirmed at runtime:
Active.width = 30, max_width = -1. Comment and CHANGELOG both corrected.
Validated: luacheck 0/0 across 86 files, cheatsheet still renders 90 lines with
exactly the two legitimate <C-s> rows, make audit 222 pass / 0 fail.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018wpwbjkGJKPFgvBFEKsFWE
|
Both addressed in 44feda2. Both were mistakes I introduced in this PR. 1. Confirmed: it's mapped at Removed, with a comment recording why it isn't there — blink's signature window is automatic via The two remaining 2. The migration equivalence still holds, but the explanation didn't. nvim-tree fills the absent keys with its own defaults — Both the inline comment and the CHANGELOG entry now say that, and point at where the defaults come from so the next reader doesn't have to take it on faith. Worth noting the pattern: I verified the equivalence of the migration carefully and then wrote an unverified sentence about what the result means. Same failure mode as the vimade claim on #257 — checking one thing and asserting a neighbouring one. Re-validated: luacheck 0/0 across 86 files, cheatsheet renders 90 lines, |
The two deferred items from the second review pass: documentation drift and dead plugin config. No behaviour change except the harpoon guard.
Cheatsheet
The panel's header claims it lays out every curated binding. An audit against the real keymaps found it didn't — two entire features had no rows:
<C-Space>,<CR>,<C-k>/<C-j>,<C-e>,<C-b>/<C-f>,<Tab>/<S-Tab>) had no representation at all.<A-hjkl>.Also added
<leader>bn/bp,<leader>cl(Trouble LSP refs/defs),]t/[t,gsh,gsn.Two descriptions corrected:
<leader>rcsaid "Edit init.lua" where the keymap'sdescis "Edit config";<leader>edropped the load-bearing "closes Zen if active" side effect.The header now scopes its completeness claim — stating what is deliberately excluded (transient-UI keys: the rename float, oil buffers, alpha's buttons, the panel's own
q/<Esc>) rather than overstating and drifting again.which-key
<leader>r(edit config, rename symbol),<leader>o(organize imports) and<leader>p(copy file path) had real children but nogroupentry, so they rendered as bare unnamed prefixes.<leader>pis declared for normal mode only — in visual it is itself a mapping (paste-without-yank), not a prefix.Dead config
Each verified against the installed plugin source, not assumed:
bufferline: drophover.reveal = { "close" }get_close_icon()(ui.lua:263-270) consultsreveal, then unconditionally bails onif not options.show_buffer_close_icons then return end—falsehere, so there was never a close icon to reveal.hoverstays on for highlighting.nvim-tree:adaptive_size = true→width = {}legacy.lua:73-81; with no explicit width it yields{ min = nil }, i.e.{}. Verified by running the migration and comparing deep-equal.fidget:winblend0 → 100notification/window.lua:33-49).nvim-treesitter-context: dropseparator = nilnilin a table literal omits the key, andnilis already the default — it read as a setting but did nothing.conform: drop theconfigfunctionopts. Verified the 20formatters_by_ftentries still apply without it.blink.cmp: fix a commentvim.snippet; withpreset = "luasnip"they route to LuaSnip.Harpoon
<leader>haon an unnamed buffer stored an unnavigable empty entry and toasted a bare"Harpoon: added ". It now refuses with a warning.Validation
luacheck lua init.luanvim --headless -c 'qa!':messagesconformopts without explicitconfigformatters_by_ftentries,lua -> { "stylua" }make auditOne audit check skipped (
yaml parse — PyYAML not importable); environmental and pre-existing.🤖 Generated with Claude Code
https://claude.ai/code/session_018wpwbjkGJKPFgvBFEKsFWE