From 1145b144df31880bf74e0df60b1f2955e5f5e350 Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 5 Jan 2026 20:48:02 +0000 Subject: [PATCH] Update README for keymaps and session management Revise the README to clarify the Neovim configuration reference, including detailed sections for session management and keymaps. --- README.md | 100 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 68 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 893dfa2..71d8507 100644 --- a/README.md +++ b/README.md @@ -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 | `xt` | Toggle diagnostics | Flips `vim.diagnostic.enable()` | | n | `hi` | Highlight inspector | Shows highlight/capture stack under cursor | -## `lua/netrw-config.lua` +### `lua/netrw-config.lua` | Mode | Key | Description | | --- | --- | --- | | n | `te` | Open netrw in a new tab rooted at current file directory | | n | `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 | `lf` | Format current buffer (synchronous) | | v | `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 | `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 | `fs` | LSP document symbols | | `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 | `` | Delete highlighted buffer | -## `lua/plugins/oil.lua` +### Oil `lua/plugins/oil.lua` -### Global launcher mappings +#### Keymaps + +##### Global launcher mappings | Mode | Key | Description | | --- | --- | --- | | n | `fo` | Open Oil in current window | | n | `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 | `` / `` | 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 | `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 | | --- | --- | | `a` | Swap parameter with next | | `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 | `` | Previous completion item | | insert | `` | Abort completion menu | -## `lua/plugins/autopairs.lua` +### Nvim-autopairs `lua/plugins/autopairs.lua` + +#### Keymaps | Mode | Key | Description | | --- | --- | --- | | insert | `` | Fast wrap the previous text with a pair | - -## `lua/keymaps_reference.lua` - -| Command | Description | -| --- | --- | -| `:KeymapsGuide` | Open this reference in a floating window (read-only) |