Neovim AI Operator Workflow
Neovim is not just an editor in this workflow. It is the human operator cockpit for code inspection, small corrective edits, LSP/DAP-backed understanding, and live review of agent-generated changes. Agents should run as separate workers. Neovim should stay the human-facing IDE layer that can inspect, correct, debug, and send precise context back to agents.Core Thesis
The best Neovim + AI setup is not “replace Neovim with a chat sidebar”. It is:Tool Roles
LSP/DAP Policy With Mason
If Mason is already the operator’s LSP/DAP manager, do not duplicate that by enabling every Claude Code LSP plugin globally. Use two separate lanes:
Mason is the right source for the human lane because it already manages LSP servers, DAP servers, linters, and formatters. Agent setup should know that Neovim/Mason may already provide the operator’s diagnostics and debug surface, but should not assume agents can directly read Neovim state unless a bridge is configured.
Startup Recommendation
Do not spin up LSPs at generic AI session start. Use this policy:- Neovim opened for project: Mason/lspconfig starts relevant LSPs naturally by buffer/root. DAP adapters are available on demand.
- Agent starts code task: runner detects project stack and either uses its own LSP capability (
omp, OpenCode events, Claude LSP plugin) or relies on typecheck/tests if no LSP bridge exists. - Human review begins: Neovim auto-reloads agent edits, diffview refreshes, LSP diagnostics update, DAP can reproduce/debug issues.
Neovim UX Needed for Agent Work
The Xata workflow captures the practical minimum:- auto-reload buffers when agents write files outside Neovim
- skip modified buffers so human edits are not clobbered
- refresh diffview when
.git/or non-ignored files change - yank selected code with relative/absolute file path and line range for agent prompts
- keep the approach agent-agnostic: Claude Code, Aider, OpenCode, Gemini, Codex, etc.
AI Plugins: Where They Fit
There are two valid modes:
Do not make an editor plugin the authoritative task queue. Let editor AI plugins consume context and propose edits.
DAP as Agent Evidence
DAP matters because many agent failures are runtime failures that LSP/typecheck cannot catch. Neovim already has the right mental model: breakpoints, launch/attach, step, inspect variables, stack frames.Design Implications
For runner choice
Useomp or another LSP-aware runner for autonomous code-changing tasks. Use Neovim/Mason for human inspection and small edits. Avoid forcing agents to drive Neovim directly unless using a deliberate bridge like claudecode.nvim or an MCP Neovim server.
Open Questions
- Should MCPHub.nvim become the preferred path for Neovim-local MCP tools, or remain an experiment?