Update README for keymaps and session management

Revise the README to clarify the Neovim configuration reference,
including detailed sections for session management and keymaps.
This commit is contained in:
Ray Elliott 2026-01-05 20:48:02 +00:00
parent a06e931c6a
commit 1145b144df
1 changed files with 68 additions and 32 deletions

100
README.md
View File

@ -1,6 +1,6 @@
# Keymap Reference
# Neovim Config Reference
Living reference of every explicit keymap defined in this config. Use `:KeymapsGuide` to open this file inside Neovim in a floating window.
Living reference for session management, keymaps, commands, and plugin-specific features in this config.
## Session Management
@ -21,7 +21,17 @@ Session support is automatic but user-controlled:
rm Session.vim # Won't auto-create a new one
```
## `lua/keymaps.lua`
## Keymaps
### `:KeymapsGuide` (`lua/keymaps_reference.lua`)
| Command | Description |
| --- | --- |
| `:KeymapsGuide` | Open a floating window with a dynamically generated list of all user-defined keymaps |
### `lua/keymaps.lua`
Core keymaps available globally (not plugin-specific). These provide fallbacks for LSP features and diagnostic navigation.
| Mode | Key | Description | Notes |
| --- | --- | --- | --- |
@ -40,14 +50,20 @@ rm Session.vim # Won't auto-create a new one
| n | `<leader>xt` | Toggle diagnostics | Flips `vim.diagnostic.enable()` |
| n | `<leader>hi` | Highlight inspector | Shows highlight/capture stack under cursor |
## `lua/netrw-config.lua`
### `lua/netrw-config.lua`
| Mode | Key | Description |
| --- | --- | --- |
| n | `<leader>te` | Open netrw in a new tab rooted at current file directory |
| n | `<leader>tE` | Open netrw in a new tab rooted at project cwd |
## `lua/plugins/lsp.lua` *(buffer-local when an LSP client attaches)*
## Plugin Reference
### LSP `lua/plugins/lsp.lua`
#### Keymaps
Buffer-local keymaps available when an LSP client attaches:
| Mode | Key | Description |
| --- | --- | --- |
@ -57,7 +73,9 @@ rm Session.vim # Won't auto-create a new one
| n | `gI` | LSP: implementation |
| n | `K` | LSP hover |
## `lua/plugins/none-ls.lua`
### None-ls (Formatting) `lua/plugins/none-ls.lua`
#### Keymaps
| Mode | Key | Description |
| --- | --- | --- |
@ -65,7 +83,9 @@ rm Session.vim # Won't auto-create a new one
| n | `<leader>lf` | Format current buffer (synchronous) |
| v | `<leader>lf` | Format visual selection |
## `lua/plugins/nvim-lint.lua`
### Nvim-lint `lua/plugins/nvim-lint.lua`
#### Commands
| Command | Description |
| --- | --- |
@ -74,7 +94,11 @@ rm Session.vim # Won't auto-create a new one
**Note:** Markdown linting is disabled by default. Spellcheck is always enabled for markdown files.
## `lua/plugins/gitsigns.lua` *(buffer-local when inside a git repo)*
### Gitsigns `lua/plugins/gitsigns.lua`
#### Keymaps
Buffer-local keymaps available when inside a git repository:
| Mode | Key | Description |
| --- | --- | --- |
@ -92,9 +116,11 @@ rm Session.vim # Won't auto-create a new one
| n | `<leader>hD` | Diff against previous commit (`~`) |
| o/x | `ih` | Text object: select git hunk |
## `lua/plugins/telescope.lua`
### Telescope `lua/plugins/telescope.lua`
### Launcher mappings (normal mode)
#### Keymaps
##### Launcher mappings (normal mode)
| Key | Description |
| --- | --- |
@ -109,7 +135,7 @@ rm Session.vim # Won't auto-create a new one
| `<leader>fs` | LSP document symbols |
| `<leader>fS` | LSP workspace symbols |
### Telescope prompt mappings (`defaults.mappings`)
##### Telescope prompt mappings (`defaults.mappings`)
| Mode | Key | Description |
| --- | --- | --- |
@ -128,22 +154,24 @@ rm Session.vim # Won't auto-create a new one
| n | `j` | Move selection down |
| n | `k` | Move selection up |
### Picker-specific overrides
##### Picker-specific overrides
| Context | Mode | Key | Description |
| --- | --- | --- | --- |
| `buffers` picker | i | `<C-d>` | Delete highlighted buffer |
## `lua/plugins/oil.lua`
### Oil `lua/plugins/oil.lua`
### Global launcher mappings
#### Keymaps
##### Global launcher mappings
| Mode | Key | Description |
| --- | --- | --- |
| n | `<leader>fo` | Open Oil in current window |
| n | `<leader>fO` | Open Oil in floating window |
### Oil buffer mappings (`opts.keymaps`)
##### Oil buffer mappings (`opts.keymaps`)
| Key | Description |
| --- | --- |
@ -164,7 +192,9 @@ rm Session.vim # Won't auto-create a new one
| `g.` | Toggle hidden files |
| `g\` | Toggle trash visibility |
## `lua/plugins/ufo.lua`
### UFO (Folding) `lua/plugins/ufo.lua`
#### Keymaps
| Mode | Key | Description |
| --- | --- | --- |
@ -176,15 +206,19 @@ rm Session.vim # Won't auto-create a new one
| preview window | `<C-u>` / `<C-d>` | Scroll within UFO preview |
| preview window | `[` / `]` | Jump to top/bottom of preview |
## `lua/plugins/undotree.lua`
### Undotree `lua/plugins/undotree.lua`
#### Keymaps
| Mode | Key | Description |
| --- | --- | --- |
| n | `<leader>u` | Toggle Undotree panel |
## `lua/plugins/treesitter.lua`
### Treesitter `lua/plugins/treesitter.lua`
### Incremental selection
#### Keymaps
##### Incremental selection
| Key | Description |
| --- | --- |
@ -192,7 +226,7 @@ rm Session.vim # Won't auto-create a new one
| `g+` | Expand to scope |
| `-` | Shrink selection |
### Textobject selection (`select.keymaps`)
##### Textobject selection (`select.keymaps`)
| Key | Target |
| --- | --- |
@ -203,7 +237,7 @@ rm Session.vim # Won't auto-create a new one
| `al` / `il` | Loop outer / inner |
| `a/` | Comment outer |
### Textobject movement (`move` mappings)
##### Textobject movement (`move` mappings)
| Key | Action |
| --- | --- |
@ -214,14 +248,16 @@ rm Session.vim # Won't auto-create a new one
| `]a` / `]A` | Next parameter start / end |
| `[a` / `[A` | Previous parameter start / end |
### Parameter swapping
##### Parameter swapping
| Key | Description |
| --- | --- |
| `<leader>a` | Swap parameter with next |
| `<leader>A` | Swap parameter with previous |
## `lua/plugins/comment.lua`
### Comment.nvim `lua/plugins/comment.lua`
#### Keymaps
| Mapping | Description |
| --- | --- |
@ -231,7 +267,9 @@ rm Session.vim # Won't auto-create a new one
| `gb` | Operator-pending block comment |
| `gcO` / `gco` / `gcA` | Insert comment above / below / end-of-line |
## `lua/plugins/surround.lua`
### Nvim-surround `lua/plugins/surround.lua`
#### Keymaps
| Mode | Mapping | Description |
| --- | --- | --- |
@ -247,7 +285,9 @@ rm Session.vim # Won't auto-create a new one
| normal | `cs{old}{new}` | Change surround |
| normal | `cS{old}{new}` | Change surround (linewise) |
## `lua/plugins/cmp.lua`
### Nvim-cmp (Completion) `lua/plugins/cmp.lua`
#### Keymaps
| Mode | Key | Description |
| --- | --- | --- |
@ -257,14 +297,10 @@ rm Session.vim # Won't auto-create a new one
| insert | `<C-p>` | Previous completion item |
| insert | `<C-e>` | Abort completion menu |
## `lua/plugins/autopairs.lua`
### Nvim-autopairs `lua/plugins/autopairs.lua`
#### Keymaps
| Mode | Key | Description |
| --- | --- | --- |
| insert | `<M-e>` | Fast wrap the previous text with a pair |
## `lua/keymaps_reference.lua`
| Command | Description |
| --- | --- |
| `:KeymapsGuide` | Open this reference in a floating window (read-only) |