GitHub - ChmaraX/herdr-nvim: Neovim, fully integrated into your herdr workspace · GitHub
/" data-turbo-transient="true" />
Skip to content
Type / to search
Sign in<br>Sign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
ChmaraX
herdr-nvim
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star<br>16
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>97 Commits<br>97 Commits
.github/workflows
.github/workflows
herdr
herdr
lua/herdr-nvim
lua/herdr-nvim
src
src
tests
tests
.gitignore
.gitignore
Cargo.lock
Cargo.lock
Cargo.toml
Cargo.toml
README.md
README.md
herdr-plugin.toml
herdr-plugin.toml
justfile
justfile
View all files
Repository files navigation
herdr-nvim
Neovim, built into your herdr workspace: a persistent<br>nvim sidebar one key away, with quick access to the files your agent works on.
herdr-nvim.mp4
Features
Full-height nvim sidebar, one key to toggle. Your panes move into the<br>left half, and nvim takes the right. Toggle it off, and herdr restores the<br>original layout. Each tab keeps its own persistent nvim, so buffers, cursor,<br>and pending annotations survive the toggle.
Fuzzy file picker. It opens on the files your agent touched recently<br>(newest first, with diff stats). Type to fuzzy-search the whole repo. ⏎<br>opens the file in the sidebar at the right line.
Code annotations you send to the agent. Comment lines or a selection<br>like a code review. Then send them all to any agent in the workspace (pi,<br>claude, codex), with file:line and git context.
Requirements
nvim ≥ 0.10 · herdr ≥ 0.7.4 · runs inside a herdr session
Install
Both halves come from this repo:
1. The herdr plugin (sidebar + picker):
herdr plugin install ChmaraX/herdr-nvim<br># or, for a local checkout: herdr plugin link /path/to/herdr-nvim
Bind keys to the two actions in ~/.config/herdr/config.toml (herdr binds<br>none by default):
[[keys.command]]<br>key = "prefix+e"<br>type = "plugin_action"<br>command = "chmarax.herdr-nvim.toggle"<br>description = "nvim sidebar"
[[keys.command]]<br>key = "prefix+o"<br>type = "plugin_action"<br>command = "chmarax.herdr-nvim.pick-file"<br>description = "open file from agent output"
2. The nvim plugin (annotations), with lazy.nvim:
{ "ChmaraX/herdr-nvim", opts = {} }
The sidebar
prefix+e toggles it. Each tab gets its own nvim, backed by a headless<br>daemon that survives the toggle. Two tabs can show two different files in two<br>sidebars. When you close and reopen a sidebar, it loses nothing. herdr<br>removes the daemons of closed tabs automatically.
The file picker
prefix+o pops a fuzzy file picker. It has two modes:
Default view (no query): the files touched this session, newest first.<br>It mines edits from the agent's session log and adds uncommitted git<br>changes. For agents that herdr does not track, it scrapes recent pane<br>output instead. The cursor starts on the newest file, so ⏎ opens it with<br>no typing.
Typing: fuzzy matches across the whole repo , ranked best first.<br>This includes every file that git ls-files reports, and it honors<br>.gitignore. The match is on the path and filename, not the file contents.
Each row shows:
the path, relative to the agent's cwd
a new badge for files created this session
green/red +N -M diff stats for uncommitted edits
a relative touched-age (2m, 3h)
If you start the picker from a non-agent pane (for example, the sidebar<br>itself), it reads the agent in the same tab. So it searches the repo that<br>you see.
The default view shows the latest max_files entries (20). A typed query is<br>uncapped.
Annotations
Mapping<br>Action
ac<br>comment the current line / visual selection
al<br>list comments (float): hover to jump, ⏎ edit, d delete
as<br>paste all comments into a chosen agent's input
aS<br>send all comments to a chosen agent (auto-submits)
Comments are ephemeral by design: in-memory only, extmark-tracked (they follow<br>your edits), cleared after a successful send. The sent prompt includes each<br>comment's file:line plus the repo and branch, so the agent has context.
For a pending-comment indicator (● 3) in your statusline:<br>require("herdr-nvim").statusline() — it returns "" when nothing is<br>pending.
Config
Two small config surfaces, one per half:
nvim side — setup{} opts:
a", -- keymap prefix<br>keymaps = true, -- set false to define your own<br>clear_after_send = true, -- comments are ephemeral by design<br>})">require("herdr-nvim").setup({<br>prefix = "a", -- keymap prefix<br>keymaps = true, -- set false to define your own<br>clear_after_send = true, -- comments are ephemeral by design<br>})
herdr side — ~/.config/herdr-nvim/config.toml (optional; missing or<br>malformed files fall back to these defaults):
[sidebar]<br>nvim_bin = "nvim" # binary...