One file: init.lua. Native LSP, completion, diagnostics, commenting. ASCII
only - no Nerd Font needed. Built for an OpenCode + herdr workflow over SSH.
Plugins (12): tokyonight, nvim-lspconfig, which-key, fzf-lua, gitsigns, neo-tree (+nui, plenary), persistence, opencode.nvim, diffview-plus, nvim-diff-review-opencode-plugin. Everything else is built in.
Leader is Space: press it and pause for the grouped menu (Find, Git, Code,
Buffer, OpenCode, Session). Space f c = any command, Space f k = any keymap.
Opening nvim restores this directory's session, otherwise it shows the file tree
(nvim <dir> opens the tree too).
git clone https://github.com/Okm165/nvim ~/.config/nvim
bash ~/.config/nvim/bootstrap.sh # deps -> nvim -> plugins -> LSP -> herdrNeeds Neovim 0.12+ (the config uses vim.pack); the script installs it if
missing or older. Language servers come from scripts/install-lsp.sh (no mason).
Three files live outside the repo:
~/.config/opencode/opencode.json- add"plugin": ["opencode-nvim-diff-review"].~/.config/herdr/config.toml- sound off, toasts via herdr, prefix-freeCtrl+Altchords.~/.agents/skills/herdr-npx skills add herdrdev/herdr --skill herdr -g.
Space f f/g/b/r/hfiles / grep / buffers / recent / help;Space /searches the buffer.- Pickers:
<Tab>marks,alt-atoggles all,Ctrl-qsends the picks to the quickfix list (walk it with]q/[q). - LSP:
gddefinition,Khover,graactions,grnrename,grrrefs,griimplementation,grttype,grxcodelens,gOsymbols,]d/[ddiagnostics;Ctrl-sin insert mode shows signature help. Space c dexplains the current line,Space c fformats the buffer.
OSC 52: any yank lands in your local machine's clipboard. Paste into nvim with p.
vchars,Vlines,Ctrl-vblocks;oswaps ends,gvreselects.- Text objects:
viwword,vipparagraph,viffunction,vi(vi"vit. - Syntax-aware selection (built in):
angrows to the parent node,inshrinks;yanyanks the node,y2anits parent.vanthengosends exactly one function call to the agent. In visual modean/inresize the selection and]n/[njump between nodes. - Whole file
ggVGy; copy the path with:let @+ = expand('%:p').
Ctrl-h/j/k/lmove focus (tree <-> code);Space etoggles the tree.]b/[bnext / prev buffer;Space b dcloses one;Space wsaves.Escclears the highlight;n/NandCtrl-d/Ctrl-ustay centered.- Visual
</>indent and keep the selection;<Esc><Esc>leaves terminal mode. - Built-ins worth knowing:
Ctrl-o/Ctrl-ijump back / forward,g;/g,walk the change list,*/#search the word under the cursor,%matches a bracket,;/,repeatf/t,Ctrl-^toggles the alternate buffer,"0ppastes the last yank without clobbering it,ZZsaves and quits.
]c/[chunks,Space g p/s/r/bpreview / stage / reset / blame. Select lines first to stage or reset a partial hunk;ihis a hunk text object, sogoihsends a whole hunk to the agent.Space g ddiffs the working tree against the index,Space g Dagainst the last commit,Space g xcloses. The view is inline unified: one window,-old lines above+new lines, no side-by-side.<Tab>/<S-Tab>files,<leader>btoggles the file list,g?help.
gosends the selection or motion with no prompt (fastest);goosends the line.Space o aopens a prompt pre-filled with@this:;Space o sopens the prompt menu (explain, review, test, implement, optimize, document, fix) as a fuzzy picker.- Placeholders:
@this,@buffer,@buffers,@diagnostics,@quickfix,@visible,@marks. - When the agent proposes an edit, a diff opens in Neovim:
]c/[cmove,dp/doaccept / reject one hunk,da/drthe whole request,qcloses.
- Tree (
Space e): nothing is hidden - dotfiles, gitignored and.gitall show.Enteropen,aadd,rrename,ddelete,Ttrash,uundo,Urestore,]g/[gnext / prev git change,?help,qclose. - Sessions auto-save per directory and restore on launch:
Space q srestore,Space q Spick,Space q llast,Space q dskip saving this one.
herdr is the cockpit, Neovim the editor and diff bridge, OpenCode the conversation in a pane.
herdr. Prefix Ctrl+b, plus prefix-free Ctrl+Alt chords: h/j/k/l panes,
c tab, [ / ] tabs, d split right, Shift+d split down, z zoom.
Ctrl+b 1/2/3 switches tab, Ctrl+b q detaches (never :q), Ctrl+b g opens
the Goto picker (/ searches, b/w/i/d filter blocked/working/idle/done), and
Ctrl+b [ is copy mode (v select, y copy, q leave). After editing herdr's
config: herdr server reload-config.
OpenCode pane. Its own leader is Ctrl+x, with its own which-key on
Ctrl+Alt+k: Ctrl+x a agents, Tab / Shift+Tab cycle agent, Ctrl+x m
models, Ctrl+x n / l sessions, Ctrl+p commands, Esc interrupts, Ctrl+j
adds a newline, Ctrl+x y copies messages. With a subagent, Right / Left
cycle child sessions and Up returns to the parent.
The loop. ssh box && cd ~/repo && herdr -> Ctrl+b 1 edit tab -> find with
Space f f / Space f g -> select and send with go -> Ctrl+b 2 watch it
work -> accept the diff (dp / do, da / dr, q) -> Space g s -> commit.
- OSC 52 is copy-only: yanking works over SSH; pasting from your local clipboard into nvim does not. Use a herdr pane for that direction.
- Tree delete:
dalways works,T(trash) needs the file on$HOME's filesystem. - KDE owns
Ctrl+Alt+l- rebind that herdr chord or use the prefix. herdr also takesCtrl+Alt+dandCtrl+Alt+[/], shadowing OpenCode's half-page-down and which-key group nav;PageUp/PageDownstill scroll. :checkhealthshows only expected warnings (no icons by design, no snacks).
herdr: Ctrl+b c/v/- hjkl np 1..9 z g w [ b ? (detach: Ctrl+b q)
prefix-free: Ctrl+Alt h/j/k/l panes, c tab, [ ] tabs, d split, z zoom
opencode: Ctrl+x a agent list Tab cycle Esc interrupt Ctrl+p commands Ctrl+Alt+k help
hints: Space, pause (which-key, grouped) Space f c commands Space f k keymaps
files: Space f f/g/b/r Space / buffer tree: Space e windows: Ctrl-h/j/k/l
picker: Tab mark alt-a all Ctrl-q to quickfix Enter open
select: an grow / in shrink to the syntax node yan yanks it van + go sends it
save: Space w buffers: ]b [b close: Space b d
session:Space q s restore / S pick / l last / d don't-save
lsp: gd K gra grn grr gO diag: ]d [d Space c d format: Space c f gcc
git: ]c [c Space g s/r/p/b diff: Space g d/D/x goih sends a hunk
agent: Space o a/s go (selection) goo (line) review diff: dp/do da/dr q
MIT - see LICENSE.