Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,42 @@ commit (`git tag -a vX.Y.Z -m vX.Y.Z`).

### Changed (internal)

- **Neovim: the cheatsheet now covers what it claims to.** An audit against the real keymaps found
the panel had drifted from the config it documents. 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 absent. Also 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"; `<leader>e` dropped the load-bearing
"closes Zen if active" side effect). The header's "EVERY curated binding" claim is now scoped to
say what is deliberately excluded (transient-UI keys: the rename float, oil buffers, alpha's
buttons, the panel's own `q`/`<Esc>`) rather than overstating.
- **Neovim: which-key names three prefixes that rendered as unnamed.** `<leader>r` (edit config,
rename symbol), `<leader>o` (organize imports) and `<leader>p` (copy file path) had real children
but no `group` entry. `<leader>p` is declared for normal mode only — in visual it is itself a
mapping (paste-without-yank), not a prefix.
- **Neovim: removed dead and misleading plugin config.** Each verified against the installed plugin
source, not assumed:
- `bufferline`: dropped `hover.reveal = { "close" }`. `get_close_icon()`
(`bufferline.nvim/lua/bufferline/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, so
there was never a close icon to reveal. `hover` stays on for hover highlighting.
- `nvim-tree`: `view = { adaptive_size = true }` → `view = { width = {} }`. `adaptive_size` is a
2023-01-15 legacy key that nvim-tree silently rewrites (`legacy.lua:73-81`); with no explicit
width it produces `{ min = nil }`, i.e. `{}`. Verified equivalent by running the migration and
comparing deep-equal. Note `{}` is not "unbounded" — nvim-tree fills the absent keys with its
own defaults (`view-state.lua:5-6,77-78`), so the pane sizes to content but never narrower than
30 columns; confirmed at runtime as `width = 30`, `max_width = -1`.
- `fidget`: `winblend = 0` → `100` (its default). The old comment said this matched "transparent
floats" — backwards; fidget's docs (`notification/window.lua:33-49`) describe `100` as the
see-through setting and anything less as blending with what's underneath.
- `nvim-treesitter-context`: dropped `separator = nil` — assigning `nil` in a table literal omits
the key, and `nil` is already the default, so it read as a setting but did nothing.
- `conform`: dropped a `config` function that re-implemented lazy.nvim's default for a spec with
`opts`. Verified the 20 `formatters_by_ft` entries still apply without it.
- `blink.cmp`: corrected a comment claiming the snippet keys use native `vim.snippet` — with
`preset = "luasnip"` they route to LuaSnip; blink picks the engine by preset.
- **Neovim: `<leader>ha` refuses an unnamed buffer.** harpoon keys its list by file path, so adding
a scratch buffer stored an unnavigable empty entry and toasted a bare `"Harpoon: added "`.
- **Neovim: `keymaps.lua` Ex-command maps use `<Cmd>…<CR>` instead of `:…<CR>`** (11 split/tab/
resize maps). `:` switches to cmdline-mode first — it echoes, is subject to cmdline mappings and
abbreviations, and clobbers a pending count or visual selection; `<Cmd>` does not.
Expand Down
41 changes: 36 additions & 5 deletions nvim/lua/gerrrt/cheatsheet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@
-- eyeball the whole surface area and rediscover the features you're under-using.
-- WHY HAND-CURATED : the mappings live across ~30 lazy specs, most bound lazily and not registered
-- until their plugin loads — so scraping `nvim_get_keymap()` at open time would show a
-- half-empty, load-order-dependent list. This table is the intentional, always-complete
-- picture; when you add a binding to a plugin spec, add its row here too (they sit next to
-- each other in review). Descriptions mirror the `desc =` on the real keymaps.
-- half-empty, load-order-dependent list. This table is the intentional picture; when you
-- add a binding to a plugin spec, add its row here too (they sit next to each other in
-- review). Descriptions mirror the `desc =` on the real keymaps.
-- SCOPE : "every curated binding" means every GLOBAL, user-facing one. Deliberately excluded, so
-- the panel stays a map rather than a dump: keys that only exist inside a transient UI
-- (the rename float, oil buffers, alpha's dashboard buttons, this panel's own q/<Esc>) and
-- plain Vim motions that aren't config-specific. An audit found the panel had drifted —
-- mini.move's <A-hjkl> and the entire blink.cmp completion set were missing — so if you
-- are adding a card, prefer over-inclusion to a silent gap.
-- ENTRY : `:Cheatsheet` (alias `:Cheat`) and `<leader>?` (see config/keymaps.lua). `q`/`<Esc>`
-- close; the panel is a throwaway scratch buffer, nothing to save.
-- DEPS : none — pure Neovim API, so it survives on a bare box the same as the rest of Core.
Expand All @@ -25,7 +31,7 @@ M.sections = {
"Essentials",
{ "<leader>?", "Open this cheatsheet" },
{ "<leader>wk", "Buffer-local keys" },
{ "<leader>rc", "Edit init.lua" },
{ "<leader>rc", "Edit config" },
{ "<Esc>", "Clear search highlight" },
{ "<leader>pa", "Copy full file path" },
{ "<leader>p", "Paste over, keep yank (x)" },
Expand Down Expand Up @@ -64,6 +70,7 @@ M.sections = {
{
"Buffers",
{ "]b / [b", "Next / previous" },
{ "<leader>bn / bp", "Next / previous (leader alias)" },
{ "<leader>bj", "Pick (jump to letter)" },
{ "<leader>bd", "Delete, keep layout" },
{ "<leader>bP", "Pin / unpin" },
Expand Down Expand Up @@ -94,6 +101,7 @@ M.sections = {
{ "<leader>fh", "Help tags" },
{ "<leader>fk", "Keymaps" },
{ "<leader>ft", "Todo comments" },
{ "]t / [t", "Next / prev todo comment" },
{ "<leader>fx / fX", "Diagnostics doc / workspace" },
{ "<leader>fs / fw", "Symbols doc / workspace" },
},
Expand All @@ -113,6 +121,7 @@ M.sections = {
{ "<leader>cf", "Format buffer / range" },
{ "<leader>cL", "Run CodeLens" },
{ "<leader>cs", "Symbols (Trouble)" },
{ "<leader>cl", "LSP refs/defs (Trouble)" },
{ "<leader>cn", "Annotation (Neogen)" },
{ "<leader>;", "Breadcrumb pick (dropbar)" },
},
Expand Down Expand Up @@ -172,10 +181,32 @@ M.sections = {
{ "a/i + f c o", "func / class / block (TS)" },
{ "gsa / gsd / gsr", "Surround add / del / replace" },
{ "gsf / gsF", "Find surround right / left" },
{ "gsh", "Highlight surround" },
{ "gsn", "Update surround search range" },
{ "]f / [f", "Next / prev function" },
{ "]a / [a", "Next / prev argument" },
{ "<leader>j", "Split / join block (treesj)" },
},
{
-- mini.move (plugins/mini-nvim.lua). Normal mode moves the current LINE; visual mode moves
-- the SELECTION and keeps it selected. h/l also re-indent, which is why they earn a row.
"Move lines (mini.move)",
{ "<A-j> / <A-k>", "Move line/selection down / up" },
{ "<A-h> / <A-l>", "Move line/selection left / right" },
},
{
-- blink.cmp (plugins/blink-cmp.lua). preset = "none", so every key here is set explicitly
-- in that spec — this card and that keymap block must be edited together.
"Completion (blink.cmp)",
{ "<C-Space>", "Show menu / toggle docs" },
{ "<C-k> / <C-j>", "Select previous / next item" },
{ "<CR>", "Accept selected item" },
{ "<C-e>", "Hide menu" },
{ "<C-b> / <C-f>", "Scroll docs up / down" },
{ "<Tab> / <S-Tab>", "Snippet: next / prev placeholder" },
-- NOT <C-s>: that is signature help, mapped in utils/lsp.lua (LSP & Code card above), not by
-- blink. blink's signature window is automatic (signature.enabled) with no key of its own.
},
{
"Sessions",
{ "<leader>qs", "Restore (this dir)" },
Expand All @@ -184,7 +215,7 @@ M.sections = {
},
{
"UI & Toggles",
{ "<leader>e", "File tree (nvim-tree)" },
{ "<leader>e", "File tree (closes Zen if active)" },
{ "-", "Parent dir (oil)" },
{ "<leader>z", "Zen mode" },
{ "<leader>U", "Undotree" },
Expand Down
5 changes: 4 additions & 1 deletion nvim/lua/gerrrt/plugins/blink-cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ return {
["<C-Space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide", "fallback" },
["<CR>"] = { "accept", "fallback" },
-- snippet jumps (blink uses the native vim.snippet engine under luasnip preset)
-- snippet jumps. NOTE: with `snippets.preset = "luasnip"` (above) these route to LuaSnip,
-- NOT to native vim.snippet — blink picks the engine by preset
-- (blink.cmp/lua/blink/cmp/config/snippets.lua:28-60). Switch the preset to "default" to
-- get vim.snippet.
["<Tab>"] = { "snippet_forward", "fallback" },
["<S-Tab>"] = { "snippet_backward", "fallback" },
},
Expand Down
7 changes: 6 additions & 1 deletion nvim/lua/gerrrt/plugins/bufferline-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ return {
separator = true,
},
},
hover = { enabled = true, delay = 150, reveal = { "close" } },
-- No `reveal = { "close" }`: it is unreachable here. get_close_icon()
-- (bufferline.nvim/lua/bufferline/ui.lua:263-270) consults hover.reveal and then
-- unconditionally bails on `if not options.show_buffer_close_icons then return end` —
-- and that is false above, so no close icon is ever drawn to reveal. hover stays enabled
-- because bufferline still uses it for hover HIGHLIGHTING.
hover = { enabled = true, delay = 150 },
},
},
config = function(_, opts)
Expand Down
6 changes: 3 additions & 3 deletions nvim/lua/gerrrt/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ return {
-- utils/lsp.lua disables bashls's LSP formatting so the "fallback" path can't shfmt it.)
},
},
config = function(_, opts)
require("conform").setup(opts)
end,
-- No `config` function: `config = function(_, opts) require("conform").setup(opts) end` is
-- byte-for-byte what lazy.nvim does by default for a spec that has `opts` and a main module,
-- so writing it out only invited drift.
}
9 changes: 8 additions & 1 deletion nvim/lua/gerrrt/plugins/fidget-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ return {
notification = {
-- keep mini.notify as THE notifier; fidget only renders LSP progress.
override_vim_notify = false,
window = { winblend = 0 }, -- match your transparent floats
-- winblend 100 is fidget's DEFAULT and is the fully see-through setting; its own docs
-- (fidget.nvim/lua/fidget/notification/window.lua:33-49) call anything under 100 the
-- blend-with-whatever-is-underneath case and "usually not desirable". The old comment
-- here ("match your transparent floats") had that backwards — 0 is the OPAQUE end.
-- Practically invisible either way under tokyonight (normal_hl = "Comment" carries no
-- bg), so keep the default rather than move away from it for a stated reason that was
-- the reverse of the truth.
window = { winblend = 100 },
},
},
}
8 changes: 8 additions & 0 deletions nvim/lua/gerrrt/plugins/harpoon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ return {
{
"<leader>ha",
function()
-- Guard the unnamed buffer: harpoon keys its list by file path, so adding a
-- scratch/[No Name] buffer stored an empty entry AND toasted a bare
-- "Harpoon: added " (expand("%:t") is "" there). Refuse instead of silently
-- polluting the list with a slot that can never be navigated back to.
if vim.api.nvim_buf_get_name(0) == "" then
vim.notify("Harpoon: buffer has no file to add", vim.log.levels.WARN)
return
end
require("harpoon"):list():add()
vim.notify("Harpoon: added " .. vim.fn.expand("%:t"), vim.log.levels.INFO)
end,
Expand Down
12 changes: 11 additions & 1 deletion nvim/lua/gerrrt/plugins/nvim-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,17 @@ return {
auto_open = true,
},
filters = { dotfiles = false },
view = { adaptive_size = true },
-- `width = {}` is the current spelling of the old `adaptive_size = true` (a 2023-01-15
-- legacy key). nvim-tree still accepts the old name but silently rewrites it
-- (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 does NOT mean "unbounded": nvim-tree fills in its own defaults
-- for the absent keys (view-state.lua:5-6,77-78) — `width.min or DEFAULT_MIN_WIDTH` (30)
-- and `width.max or DEFAULT_MAX_WIDTH` (-1, i.e. no cap). So the pane sizes to its
-- content but never narrower than 30 columns. Set `{ min = N }` / `{ max = N }` to
-- change either bound.
view = { width = {} },
})
end,
}
5 changes: 4 additions & 1 deletion nvim/lua/gerrrt/plugins/treesitter-context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ return {
multiline_threshold = 1, -- collapse multiline signatures to a single line
trim_scope = "outer",
mode = "cursor",
separator = nil,
-- No `separator = nil` line: assigning nil in a table literal simply omits the key, and
-- nil is already the default (nvim-treesitter-context/lua/treesitter-context/config.lua:44)
-- — it read as a deliberate setting but did nothing. Set it to a string to draw a rule
-- under the context (which also makes it require 2+ lines above the cursorline).
},
}
8 changes: 8 additions & 0 deletions nvim/lua/gerrrt/plugins/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ return {
{ "<leader>w", group = "which-key" },
{ "<leader>x", group = "trouble / lists" },
{ "<leader><tab>", group = "tabs" },
-- These three had real children but no group entry, so which-key rendered them as bare
-- unnamed prefixes: <leader>r (rc = edit config, rn = rename symbol), <leader>o
-- (oi = organize imports), <leader>p (pa = copy file path).
{ "<leader>r", group = "rename / config" },
{ "<leader>o", group = "organize" },
-- normal mode only: in visual, <leader>p is itself a mapping (paste-without-yank,
-- config/keymaps.lua), not a prefix — declaring a group there would misdescribe it.
{ "<leader>p", group = "path", mode = "n" },
-- non-leader: mini.surround moved here off `s` so flash owns `s` (see mini-nvim.lua)
{ "gs", group = "surround", mode = { "n", "x" } },
},
Expand Down
Loading