fix: keymap conflicts + generated Vim keymap cheatsheet #10

Merged
rootiest merged 4 commits from fix/keymap-conflicts-cheatsheet into main 2026-10-04 06:42:33 +00:00
Owner

Summary

Three commits:

  1. fix: resolve keymap conflicts and broken plugin setup. Fixes the problems found while building the cheatsheet; each was verified headless with the real config.
  2. docs: add generated Vim keymap cheatsheet. docs/cheatsheet/cheatsheet.html is an interactive, single-file reference of every built-in key plus this config's live keymaps, built the same way as the QMK cheatsheet (generator + template).
  3. docs: link the cheatsheet and publish it to pages.rootiest.dev.
    • The README now links the published cheatsheet and corrects mapping rows that no longer matched the config.
    • .github/workflows/pages.yml publishes the cheatsheet on push to main. It runs on Gitea only and is skipped on the GitHub mirror.

Config fixes

Problem Fix
d c x D C X and <leader>gB/cf/cb* mapped with "v" also fired in Select mode, so typing over a snippet placeholder ran commands Mode "x" instead of "v"
"add, "_dd were ignored (always register d) expr maps: add "d only when no register was typed
gr (nowait) made Neovim's grn gra gri grt grx unreachable References moved to grr
Normal <Tab> (Sidekick NES) did nothing without a suggestion and swallowed <C-i> Falls back to jump forward; <C-i> mapped to itself
]] / [[ in Terminal mode swallowed shell brackets Normal mode only
<leader>sq defined twice (quickfix picker lost), <leader>n twice Quickfix picker restored; :nohlsearch on <leader>ur; duplicate removed
<leader>sp errored (Snacks' lazy source needs lazy.nvim) Greps the vim.pack specs in lua/plugins.lua
Format on save ran twice (BufWritePre :Format + conform) Autocmd removed; :Format kept
blink <C-k> blocked digraphs; <C-n>/<C-p> did nothing with the menu closed <C-k> freed; <C-n>/<C-p> open the menu
mini.ai took Neovim 0.12's an/in mini.ai next objects on aN/iN
gx.nvim never mapped gx gx → :Browse
mason-lspconfig v2 ignores handlers (lua_ls Config global never applied) vim.lsp.config() for lua_ls / rust_analyzer
Flash f/t searched across lines multi_line = false (and dropped the invalid keys = {})

Unchanged on purpose: <CR> stays Leap everywhere, including quickfix and q: windows.

Habit changes: references are grr (was gr), and mini.ai next objects are aN/iN (was an/in).

Cheatsheet

  • Coverage: about 1,300 built-ins from $VIMRUNTIME/doc/index.txt, about 250 live maps with their source file:line, about 600 plugin-window keys, and 140 commands.
  • Sections:
    • "What's different here" cards
    • built-ins replaced by a mapping, and keys that now wait for timeoutlen
    • an interactive keyboard with 12 layers
    • a leader tree
    • a filterable finder (/ to focus)
    • a text-object composer
    • plugin-window tabs
    • a commands list
  • Regenerate after config changes: python3 docs/cheatsheet/gen_cheatsheet.py. It runs dump.lua headless against the live config.

Testing

  • Headless Neovim with the real config, checking each fix: Select-mode typing, registers, grn reachable, <Tab> fallback, <C-k>a: → ä, lua_ls settings, <leader>sp picker, no startup errors.
  • Cheatsheet: the generator runs clean; node --check passes; headless Firefox shows no console errors and no overflow at 390px; search, the composer and the difference lists were exercised.

Publishing (pages.rootiest.dev)

Server side, already set up on racknerd:

  • Caddy: a pages.rootiest.dev site that serves ~/docker/caddy/pages (file_server with directory listings and clean URLs). Any private/ folder sits behind the existing TinyAuth gate (Rootiest ID login) and is hidden from listings.
  • act_runner: a new pages label (a container job), and valid_volumes limited to that one web root.

After merge the cheatsheet is at https://pages.rootiest.dev/neovim-config/cheatsheet/. To publish from another repo, copy pages.yml and edit its PAGES list.

## Summary Three commits: 1. **fix: resolve keymap conflicts and broken plugin setup.** Fixes the problems found while building the cheatsheet; each was verified headless with the real config. 2. **docs: add generated Vim keymap cheatsheet.** `docs/cheatsheet/cheatsheet.html` is an interactive, single-file reference of every built-in key plus this config's live keymaps, built the same way as the QMK cheatsheet (generator + template). 3. **docs: link the cheatsheet and publish it to pages.rootiest.dev.** - The README now links the published cheatsheet and corrects mapping rows that no longer matched the config. - `.github/workflows/pages.yml` publishes the cheatsheet on push to `main`. It runs on Gitea only and is skipped on the GitHub mirror. ## Config fixes | Problem | Fix | |---|---| | `d c x D C X` and `<leader>gB/cf/cb*` mapped with `"v"` also fired in Select mode, so typing over a snippet placeholder ran commands | Mode `"x"` instead of `"v"` | | `"add`, `"_dd` were ignored (always register `d`) | expr maps: add `"d` only when no register was typed | | `gr` (nowait) made Neovim's `grn gra gri grt grx` unreachable | References moved to `grr` | | Normal `<Tab>` (Sidekick NES) did nothing without a suggestion and swallowed `<C-i>` | Falls back to jump forward; `<C-i>` mapped to itself | | `]]` / `[[` in Terminal mode swallowed shell brackets | Normal mode only | | `<leader>sq` defined twice (quickfix picker lost), `<leader>n` twice | Quickfix picker restored; `:nohlsearch` on `<leader>ur`; duplicate removed | | `<leader>sp` errored (Snacks' `lazy` source needs lazy.nvim) | Greps the `vim.pack` specs in `lua/plugins.lua` | | Format on save ran twice (`BufWritePre :Format` + conform) | Autocmd removed; `:Format` kept | | blink `<C-k>` blocked digraphs; `<C-n>/<C-p>` did nothing with the menu closed | `<C-k>` freed; `<C-n>/<C-p>` open the menu | | mini.ai took Neovim 0.12's `an`/`in` | mini.ai next objects on `aN`/`iN` | | gx.nvim never mapped `gx` | `gx` → `:Browse` | | mason-lspconfig v2 ignores `handlers` (lua_ls `Config` global never applied) | `vim.lsp.config()` for lua_ls / rust_analyzer | | Flash `f/t` searched across lines | `multi_line = false` (and dropped the invalid `keys = {}`) | Unchanged on purpose: `<CR>` stays Leap everywhere, including quickfix and `q:` windows. **Habit changes:** references are `grr` (was `gr`), and mini.ai next objects are `aN`/`iN` (was `an`/`in`). ## Cheatsheet - **Coverage:** about 1,300 built-ins from `$VIMRUNTIME/doc/index.txt`, about 250 live maps with their source file:line, about 600 plugin-window keys, and 140 commands. - **Sections:** - "What's different here" cards - built-ins replaced by a mapping, and keys that now wait for `timeoutlen` - an interactive keyboard with 12 layers - a leader tree - a filterable finder (`/` to focus) - a text-object composer - plugin-window tabs - a commands list - **Regenerate** after config changes: `python3 docs/cheatsheet/gen_cheatsheet.py`. It runs `dump.lua` headless against the live config. ## Testing - Headless Neovim with the real config, checking each fix: Select-mode typing, registers, `grn` reachable, `<Tab>` fallback, `<C-k>a:` → `ä`, lua_ls settings, `<leader>sp` picker, no startup errors. - Cheatsheet: the generator runs clean; `node --check` passes; headless Firefox shows no console errors and no overflow at 390px; search, the composer and the difference lists were exercised. ## Publishing (pages.rootiest.dev) Server side, already set up on racknerd: - **Caddy:** a `pages.rootiest.dev` site that serves `~/docker/caddy/pages` (`file_server` with directory listings and clean URLs). Any `private/` folder sits behind the existing TinyAuth `gate` (Rootiest ID login) and is hidden from listings. - **act_runner:** a new `pages` label (a container job), and `valid_volumes` limited to that one web root. After merge the cheatsheet is at **https://pages.rootiest.dev/neovim-config/cheatsheet/**. To publish from another repo, copy `pages.yml` and edit its `PAGES` list.
rootiest added 2 commits 2026-10-04 03:39:54 +00:00
- d/c/x and the <leader>gB/cf/cb* maps use "x" instead of "v" so they
  no longer fire in Select mode (typing over snippet placeholders)
- d/c/x only default to register d when no register was typed
- LSP references move from a nowait gr to grr, so Neovim's
  grn/gra/gri/grt/grx defaults are reachable again
- Normal <Tab> falls back to jump forward without an NES suggestion;
  <C-i> is mapped to itself for terminals that distinguish it
- ]] / [[ (Snacks words) are Normal mode only
- <leader>sq is the quickfix picker again; :nohlsearch moves to
  <leader>ur; drop the duplicate <leader>n
- <leader>sp greps the vim.pack specs (Snacks' lazy source needs lazy.nvim)
- drop the BufWritePre :Format autocmd; conform's format_on_save
  already formats on write
- blink.cmp: free <C-k> for digraphs; <C-n>/<C-p> open the menu when
  it is closed
- mini.ai next objects move to aN/iN so Neovim's an/in stay available
- map gx to gx.nvim's :Browse
- replace the ignored mason-lspconfig handlers with vim.lsp.config()
- flash char mode stays on the current line (multi_line = false)
Interactive single-file cheatsheet of every built-in key and this
config's live keymaps, generated by docs/cheatsheet/gen_cheatsheet.py
from $VIMRUNTIME/doc/index.txt, a headless dump of the config
(dump.lua) and curated plugin/config notes (curated/*.json).
rootiest added 1 commit 2026-10-04 05:41:48 +00:00
- README: link to the published cheatsheet, explain how to regenerate
  it, and correct mapping rows that no longer matched the config
  (grr, Leap on <CR>, mini.surround sa/sd/sr, gx, Sidekick CLI)
- .github/workflows/pages.yml: on push to main, copy the cheatsheet into
  the Caddy web root via the racknerd runner's "pages" label (Gitea
  only; skipped on the GitHub mirror)
rootiest force-pushed fix/keymap-conflicts-cheatsheet from 9e58c11845 to 0c52d27b8e 2026-10-04 05:41:48 +00:00 Compare
rootiest added 1 commit 2026-10-04 06:41:34 +00:00
rootiest merged commit 5cdf05384e into main 2026-10-04 06:42:33 +00:00
rootiest deleted branch fix/keymap-conflicts-cheatsheet 2026-10-04 06:42:33 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rootiest/neovim-config#10