feat: nvim config tracks the live tree
Port the live ~/.config/nvim working tree (bcherb2/nvim master plus its uncommitted git.lua and minimap.lua edits): adds claudecode, eslint, lsp, typescript, meow-yarn and refactoring-fix specs, drops the files the live repo deleted, and takes live for everything else. Kept from public: lazy.lua with luarocks disabled, the ai_assist cond guard (nvim-ai-assist is not anonymously clonable, so a fresh box only gets it from the private clone list), and the scrubbed endpoint comment in place of live's LAN address.
This commit is contained in:
1 parent
9baaf78522
commit
0aaaf51421
28 files changed
+1001
-611
No files matched your search
@@ -1,210 +1,192 @@
|
||||
# LazyVim Plugin Cheatsheet
|
||||
# Neovim Cheatsheet
|
||||
|
||||
Quick reference for the custom plugins in your configuration.
|
||||
What this LazyVim config adds or changes. `<leader>` is Space. Everything else is stock LazyVim:
|
||||
`<leader>sk` searches all keymaps, `<leader>?` shows the current buffer's keymaps.
|
||||
|
||||
---
|
||||
|
||||
## Git Tools (`lua/plugins/git.lua`)
|
||||
## Markdown (md-render.nvim, `lua/plugins/image.lua`)
|
||||
|
||||
### git-blame.nvim
|
||||
Shows git blame information at the end of each line.
|
||||
Opening a `.md` file shows the **rendered view** (a separate read-only buffer, images and
|
||||
mermaid/PlantUML diagrams drawn inline). The source buffer is what you edit.
|
||||
|
||||
**Commands:**
|
||||
- `:GitBlameToggle` - Toggle git blame on/off
|
||||
- `:GitBlameEnable` - Enable git blame
|
||||
- `:GitBlameDisable` - Disable git blame
|
||||
- `:GitBlameOpenCommitURL` - Open commit in browser
|
||||
- `:GitBlameCopySHA` - Copy commit SHA to clipboard
|
||||
| Key / command | What it does |
|
||||
|---|---|
|
||||
| `i` `I` `a` `A` `o` `O` | Jump to the source line and start inserting; leaving Insert re-renders. Fast typing keeps its order; a count works (`3o`) |
|
||||
| `dd` `x` `p` `u` `<C-r>` `.` `J` `>` `gUU` `gq` … | Editing keys jump to the matching source line and run there |
|
||||
| (wait ~200 ms) | After a normal-mode edit, the view returns to rendered once Neovim is idle |
|
||||
| `yy`, Visual `y` / `Y` | Copy the **markdown source** behind the rows (linewise); the view stays rendered. A charwise selection inside one row is a normal yank |
|
||||
| `v` / `V` | Jump to source and start Visual there. For a selection *in* the rendered view use a mouse drag, `<C-v>` or `gv` |
|
||||
| `<leader>mr` | Render ⇄ source in place (mapped in the markdown source buffer) |
|
||||
| `<leader>mp` / `<leader>mt` / `<leader>ms` | Preview in a wide float / a tab / a source+render split (source buffer) |
|
||||
| `<leader>md` | md-render demo |
|
||||
| `:MdRender toggle\|split\|tab\|float\|auto on\|off` | Same from the command line (works in the rendered view too) |
|
||||
|
||||
**Default:** Enabled on startup
|
||||
- **Diagram guard:** a destructive key (`dd`, `x`, `J`, `gUU`, …) on a rendered diagram does *not*
|
||||
edit. It jumps to the diagram's opening fence and says so; edit the block there.
|
||||
- A changed diagram re-renders in the background; you briefly see "Rendering mermaid diagram...".
|
||||
- **Limits:** `dd` on a reflowed paragraph deletes only its first source line; `i`/`a` on a
|
||||
diagram row insert at the closing fence.
|
||||
- **Turn off return-to-render:** `vim.g.md_render_hop_return = false` (e.g. in `options.lua`).
|
||||
- **render-markdown.nvim** only decorates floats (LSP hover, completion docs). Source buffers stay
|
||||
plain; `:RenderMarkdown buf_toggle` turns it on for one buffer.
|
||||
- No linters for markdown / mdx (`markdown.lua`); marksman diagnostics are muted.
|
||||
|
||||
---
|
||||
|
||||
### diffview.nvim
|
||||
Advanced git diff and history viewer.
|
||||
## Clipboard and selections
|
||||
|
||||
**Key Bindings:**
|
||||
- `<leader>gd` - Open diff view of current changes
|
||||
- `<leader>gh` - View current file's git history
|
||||
- `<leader>gH` - View entire repo's git history
|
||||
`clipboard=unnamedplus` everywhere, so `y`/`p` use the system clipboard.
|
||||
|
||||
**Commands:**
|
||||
- `:DiffviewOpen` - Open diff view
|
||||
- `:DiffviewClose` - Close diff view
|
||||
- `:DiffviewFileHistory` - View repo history
|
||||
- `:DiffviewFileHistory %` - View current file history
|
||||
- `:DiffviewRefresh` - Refresh the diff view
|
||||
| Where nvim runs | Copy (`y`) | Paste (`p`) |
|
||||
|---|---|---|
|
||||
| **Inside tmux** | tmux buffer (`load-buffer -w`: also the outer terminal if tmux's `set-clipboard` allows) | tmux buffer; first asks the outer terminal (`refresh-client -l`), which may prompt (Ghostty) or not answer (Warp) |
|
||||
| **SSH / herdr** (no tmux) | One OSC 52 copy to your Mac's clipboard | The last yank from **any nvim on this host** (`~/.local/state/nvim/clipboard/last`, mode 0600, survives reboots). Never reads the Mac clipboard |
|
||||
| **Local macOS** | `pbcopy` | `pbpaste` |
|
||||
|
||||
**In Diffview:**
|
||||
- `]c` / `[c` - Jump to next/previous change
|
||||
- `<tab>` / `<S-tab>` - Select next/previous file
|
||||
- `gf` - Open file in new tab
|
||||
- `q` - Close diffview
|
||||
- **Mac → nvim over SSH:** paste with the terminal, **Cmd-V** (works in every mode). There is no
|
||||
runtime hint for this.
|
||||
- Over 512 KiB a yank warns that the terminal may drop the OSC 52 payload; over 8 MiB it is not
|
||||
shared with other instances.
|
||||
|
||||
| Selection | How you get it | Keys |
|
||||
|---|---|---|
|
||||
| **Select mode** | Shift+arrows | Typing replaces the selection at once (Space too). `<C-c>` copy, `<C-x>` cut, `<C-g>` switch to Visual |
|
||||
| **Visual mode** | Mouse drag, `v`, `V`, `<C-v>` | `y` `d` `p` as usual; `<C-c>` also copies (`<C-x>` stays decrement) |
|
||||
|
||||
- `<leader>p` yank history (yanky). Over SSH the yank ring doesn't sync with the clipboard.
|
||||
Yanks from the md-render view don't enter the ring.
|
||||
- `<leader>cy` / `<leader>cY` copy the file's relative / absolute path.
|
||||
|
||||
---
|
||||
|
||||
## UI Enhancements (`lua/plugins/ui-enhancements.lua`)
|
||||
## Search and replace (`lua/plugins/search.lua`)
|
||||
|
||||
### render-markdown.nvim
|
||||
Renders markdown with better formatting while editing.
|
||||
| Key | What it does |
|
||||
|---|---|
|
||||
| `n` / `N` | Next / previous match, **always forward / backward** (even after `?`), opens folds, shows the hlslens `[i/n]` lens |
|
||||
| `*` `#` `g*` `g#` | Word search with the lens |
|
||||
| `<leader>Rs` (Visual) / `<leader>Ro` / `<leader>Rw` / `<leader>RW` / `<leader>Re` / `<leader>Rf` | search-replace.nvim, current buffer: selection / prompt / word / WORD / expression / filename |
|
||||
| `<leader>Rbs` (Visual) / `<leader>Rbo` / `<leader>Rbw` / `<leader>RbW` / `<leader>Rbe` / `<leader>Rbf` | Same across all buffers |
|
||||
| `<leader>sr` | LazyVim's grug-far search and replace (project-wide) |
|
||||
| `<leader>rs` | Refactoring menu (LazyVim refactoring extra; `<leader>rf` extract function, `<leader>rx` extract variable, `<leader>ri` inline variable) |
|
||||
|
||||
**Features:**
|
||||
- Automatically styles headers, lists, code blocks
|
||||
- Works only in markdown files
|
||||
- No commands needed - always active in `.md` files
|
||||
|
||||
**Toggle:** Disable by setting `enabled = false` in config
|
||||
- refactoring.nvim is pinned to `8bcf893` while Neovim is older than 0.12.5
|
||||
(`lua/plugins/refactoring-fix.lua`). Newer commits call `vim.range`/`vim.pos` with the 0.12.5
|
||||
signature and every refactor fails with `E5108 … vim/range.lua:98` on 0.12.1. After upgrading
|
||||
Neovim, delete that file and run `:Lazy update refactoring.nvim`.
|
||||
|
||||
---
|
||||
|
||||
### hlargs.nvim
|
||||
Highlights function arguments with different colors.
|
||||
## Completion and AI
|
||||
|
||||
**Features:**
|
||||
- Automatically highlights function parameters
|
||||
- Helps distinguish arguments visually
|
||||
- Works across all supported languages
|
||||
|
||||
**No commands needed** - always active
|
||||
| Item | State |
|
||||
|---|---|
|
||||
| blink.cmp | On; sources LSP, path, snippets (no buffer words). Markdown: LSP + path only. friendly-snippets' global snippets (dates, lorem) off |
|
||||
| `<leader>uk` | Toggle all insert-mode completion on/off (global) |
|
||||
| Inline ghost text | **Off** (`vim.g.ai_cmp = false` in `options.lua`). Command-line ghost text is still on (not AI) |
|
||||
| nvim_ai_assist (`:AI`) | **Disabled** (see below) |
|
||||
| Claude Code (LazyVim extra) | `<leader>ac` toggle, `<leader>af` focus, `<leader>ar` resume, `<leader>aC` continue, `<leader>ab` add buffer, `<leader>as` send selection (Visual) / add file (neo-tree), `<leader>aa` / `<leader>ad` accept / deny diff |
|
||||
|
||||
---
|
||||
|
||||
### twilight.nvim
|
||||
Dims inactive code to focus on current block.
|
||||
## Git
|
||||
|
||||
**Key Bindings:**
|
||||
- `<leader>ut` - Toggle Twilight mode
|
||||
| Key / command | What it does |
|
||||
|---|---|
|
||||
| git-blame.nvim | Blame as virtual text at column 80; `:GitBlameToggle`, `:GitBlameCopySHA`, `:GitBlameOpenCommitURL` |
|
||||
| `<leader>gd` / `<leader>gh` / `<leader>gH` | Diffview: changes / file history / repo history |
|
||||
| `<leader>dv` / `<leader>ds` / `<leader>dh` / `<leader>dH` | Diffview: open / staged / file history / all history |
|
||||
| `<leader>go` / `<leader>uG` | mini.diff overlay / signs |
|
||||
| `<leader>gb` / `<leader>gg` | Blame line / lazygit (LazyVim) |
|
||||
|
||||
**Commands:**
|
||||
- `:Twilight` - Toggle twilight
|
||||
- `:TwilightEnable` - Enable twilight
|
||||
- `:TwilightDisable` - Disable twilight
|
||||
|
||||
**Best for:** Focusing on specific functions or code blocks
|
||||
In Diffview: `]c` `[c` hunks, `<Tab>` `<S-Tab>` files, `q` close (`:DiffviewClose`).
|
||||
|
||||
---
|
||||
|
||||
### theme-hub.nvim
|
||||
Browse and switch colorschemes with live preview.
|
||||
## UI
|
||||
|
||||
**Key Bindings:**
|
||||
- `<leader>uT` - Open Theme Hub
|
||||
| Key | What it does |
|
||||
|---|---|
|
||||
| `<leader>um` / `<leader>uM` | Minimap (neominimap, on at start; shows diagnostics, mini.diff changes, search) toggle / focus |
|
||||
| `<leader>uf` | LazyVim's auto-format toggle (global) |
|
||||
| `<leader>ut` | Twilight (dim inactive code). Hides LazyVim's treesitter-context toggle: use `:TSContext toggle` |
|
||||
| `<leader>uT` | Themery theme picker (`:Themery`). Hides LazyVim's treesitter-highlight toggle: use `:lua Snacks.toggle.treesitter():toggle()`. `<leader>uC` is LazyVim's colorscheme picker |
|
||||
| `<leader>ug` | Indent guides (snacks.indent) |
|
||||
|
||||
**Commands:**
|
||||
- `:ThemeHub` - Open theme browser
|
||||
|
||||
**In Theme Hub:**
|
||||
- `j` / `k` - Navigate themes
|
||||
- `<CR>` - Apply selected theme
|
||||
- `<Esc>` / `q` - Close without applying
|
||||
Always on: hlargs (argument colours), smear-cursor, treesitter-context.
|
||||
|
||||
---
|
||||
|
||||
## Search Tools (`lua/plugins/search.lua`)
|
||||
## Files and navigation
|
||||
|
||||
### nvim-hlslens
|
||||
Enhanced search highlighting with match counts.
|
||||
| Key | What it does |
|
||||
|---|---|
|
||||
| `<leader>e` / `<leader>E` | neo-tree (root / cwd); shows dotfiles, gitignored files and `*.log` |
|
||||
| `<leader>ff` / `<leader><space>` | Find files (Telescope; includes hidden and gitignored files) |
|
||||
| `<leader>/` / `<leader>sg` | Grep (includes gitignored files) |
|
||||
| `<leader>fg` / `<leader>fb` / `<leader>fr` | Git files / buffers / recent |
|
||||
| `<leader>sh` / `<leader>sk` | Help / keymaps |
|
||||
| `<leader>H` / `<leader>h` / `<leader>1`–`<leader>9` | Harpoon: add file / menu / jump |
|
||||
| `<leader>cs` / `<leader>ss` | Aerial outline / symbol search |
|
||||
| `<leader>fp` | Projects |
|
||||
| `<leader>cv` | CSV/TSV aligned view (in `.csv` / `.tsv` buffers) |
|
||||
| `<leader>t…` | Tests (neotest, incl. vitest) |
|
||||
| `<leader>sz` | chezmoi files |
|
||||
|
||||
**Key Bindings:**
|
||||
- `n` - Next search result (enhanced)
|
||||
- `N` - Previous search result (enhanced)
|
||||
- `*` - Search word under cursor (enhanced)
|
||||
- `#` - Search word backward (enhanced)
|
||||
- `g*` / `g#` - Search without word boundaries
|
||||
|
||||
**Features:**
|
||||
- Shows match count (e.g., "3/15")
|
||||
- Floating window near cursor
|
||||
- Automatically clears after cursor movement
|
||||
TypeScript uses the `tsc` LSP from the lang.typescript.tsc extra (project-local TypeScript 7 when present).
|
||||
|
||||
---
|
||||
|
||||
### search-replace.nvim
|
||||
Advanced multi-buffer search and replace.
|
||||
## Disabled on purpose (and how to undo)
|
||||
|
||||
**Single Buffer Operations:**
|
||||
- `<leader>rs` - Search/replace in visual selection
|
||||
- `<leader>ro` - Search/replace (open prompt)
|
||||
- `<leader>rw` - Search/replace word under cursor
|
||||
- `<leader>rW` - Search/replace WORD under cursor
|
||||
- `<leader>re` - Search/replace expression
|
||||
- `<leader>rf` - Search/replace filename
|
||||
|
||||
**Multi-Buffer Operations:**
|
||||
- `<leader>rbs` - Search/replace selections (all buffers)
|
||||
- `<leader>rbo` - Search/replace open (all buffers)
|
||||
- `<leader>rbw` - Search/replace word (all buffers)
|
||||
- `<leader>rbW` - Search/replace WORD (all buffers)
|
||||
- `<leader>rbe` - Search/replace expression (all buffers)
|
||||
- `<leader>rbf` - Search/replace filename (all buffers)
|
||||
|
||||
**Commands:**
|
||||
- `:SearchReplaceSingleBuffer` - Single buffer mode
|
||||
- `:SearchReplaceMultiBuffer` - Multi-buffer mode
|
||||
- `:SearchReplaceWithinVisualSelection` - Within selection
|
||||
| Plugin / feature | Why | Re-enable |
|
||||
|---|---|---|
|
||||
| nvim-tree | neo-tree is the explorer; both fought over `<leader>e` | Delete `enabled = false` in `lua/plugins/nvim-tree.lua` |
|
||||
| indent-blankline | snacks.indent already draws guides | Delete `enabled = false` in `lua/plugins/indent.lua` |
|
||||
| nvim_ai_assist (`:AI`) | AI off | Delete `enabled = false` in `lua/plugins/ai_assist.lua` |
|
||||
| noice.nvim | Caused treesitter errors | Delete `lua/plugins/noice-fix.lua` |
|
||||
| Inline AI ghost text | AI off | `vim.g.ai_cmp = true` in `lua/config/options.lua` |
|
||||
| md-render return-to-render | — (on) | `vim.g.md_render_hop_return = false` turns it off |
|
||||
| render-markdown in source buffers | md-render owns the rendered view | Remove the `overrides` line in `ui-enhancements.lua`, or `:RenderMarkdown buf_toggle` |
|
||||
| refactoring.nvim updates | Pinned to `8bcf893`: newer commits need Neovim 0.12.5 | Upgrade Neovim, delete `lua/plugins/refactoring-fix.lua`, `:Lazy update refactoring.nvim` |
|
||||
|
||||
---
|
||||
|
||||
## File Type Tools (`lua/plugins/filetypes.lua`)
|
||||
|
||||
### csvview.nvim
|
||||
Formats and aligns CSV/TSV files for better readability.
|
||||
|
||||
**Key Bindings:**
|
||||
- `<leader>cv` - Toggle CSV view (only in CSV/TSV files)
|
||||
|
||||
**Commands:**
|
||||
- `:CsvViewEnable` - Enable CSV formatting
|
||||
- `:CsvViewDisable` - Disable CSV formatting
|
||||
- `:CsvViewToggle` - Toggle CSV view
|
||||
|
||||
**File Types:** Automatically works with `.csv` and `.tsv` files
|
||||
|
||||
---
|
||||
|
||||
## Built-in LazyVim Extras
|
||||
|
||||
These are enabled via `lazyvim.json` and have their own keybindings:
|
||||
|
||||
### Telescope
|
||||
- `<leader>ff` - Find files
|
||||
- `<leader>fg` - Live grep
|
||||
- `<leader>fb` - Browse buffers
|
||||
- `<leader>fh` - Help tags
|
||||
|
||||
### Neo-tree
|
||||
- `<leader>e` - Toggle file explorer
|
||||
- `<leader>E` - Toggle file explorer (current file)
|
||||
|
||||
### Harpoon2
|
||||
- `<leader>h` - Harpoon menu
|
||||
- `<leader>a` - Add file to harpoon
|
||||
|
||||
### Aerial (Code Outline)
|
||||
- `<leader>cs` - Open symbols outline
|
||||
|
||||
### Project Management
|
||||
- `<leader>fp` - Find project
|
||||
|
||||
---
|
||||
|
||||
## Tips
|
||||
|
||||
1. **Enable/Disable Plugins:** Edit the respective file in `lua/plugins/` and set `enabled = false`
|
||||
2. **View All Keymaps:** Press `<leader>sk` (search keymaps) in Telescope
|
||||
3. **Check Plugin Status:** Run `:Lazy` to see installed plugins
|
||||
4. **Update Plugins:** Run `:Lazy update`
|
||||
5. **View Help:** Most plugins have `:help <plugin-name>` documentation
|
||||
|
||||
---
|
||||
|
||||
## Plugin Files Location
|
||||
## Files
|
||||
|
||||
```
|
||||
~/.config/nvim/lua/plugins/
|
||||
├── git.lua # Git blame & diffview
|
||||
├── ui-enhancements.lua # Render-markdown, hlargs, twilight, theme-hub
|
||||
├── search.lua # Hlslens, search-replace
|
||||
├── filetypes.lua # CSV viewer
|
||||
└── markdown.lua # Markdown-specific config
|
||||
~/.config/nvim/
|
||||
├── init.lua # loads config.lazy
|
||||
├── lazyvim.json # enabled LazyVim extras
|
||||
├── lazy-lock.json # plugin versions
|
||||
└── lua/
|
||||
├── config/
|
||||
│ ├── options.lua # ai_cmp off, clipboard providers, Select/Visual setup
|
||||
│ ├── keymaps.lua # <leader>cy/cY, <C-c>/<C-x> copy/cut
|
||||
│ ├── autocmds.lua # (empty)
|
||||
│ └── lazy.lua # lazy.nvim bootstrap
|
||||
└── plugins/
|
||||
├── image.lua # md-render: auto render, hop keys, yank, mermaid, image transport
|
||||
├── ui-enhancements.lua # render-markdown (floats only), hlargs, twilight, themery
|
||||
├── themes.lua # colorscheme plugins for themery
|
||||
├── search.lua # hlslens n/N, search-replace (<leader>R)
|
||||
├── git.lua # git-blame, diffview (options + <leader>g keys)
|
||||
├── diffview.lua # diffview <leader>d keys
|
||||
├── minimap.lua # neominimap (<leader>um / <leader>uM)
|
||||
├── blink.lua # completion sources, <leader>uk
|
||||
├── claudecode.lua # Claude Code selection maps in Visual only
|
||||
├── ai_assist.lua # nvim_ai_assist (disabled)
|
||||
├── yanky.lua # no ring/clipboard sync over SSH
|
||||
├── telescope.lua # show hidden + ignored files
|
||||
├── neo-tree-extras.lua # show dotfiles / gitignored / *.log
|
||||
├── filetypes.lua # csvview
|
||||
├── markdown.lua # no markdown linting / marksman diagnostics
|
||||
├── lsp.lua # gD only where the server supports it
|
||||
├── refactoring-fix.lua # pin refactoring.nvim on Neovim < 0.12.5
|
||||
├── typescript.lua # neotest-vitest
|
||||
├── smear_cursor.lua # smear-cursor options
|
||||
├── indent.lua # indent-blankline (disabled)
|
||||
├── nvim-tree.lua # nvim-tree (disabled)
|
||||
└── noice-fix.lua # noice (disabled)
|
||||
```
|
||||
Reference in new issue
Block a user