Skip to content

jeremiahsmithdev/diffusion.nvim

Repository files navigation

diffusion.nvim

AI coding assistants in your editor, without the context-switching tax.

diffusion.nvim bridges Claude Code, OpenCode, and Codex to Neovim over the Model Context Protocol. It handles the workflow friction around LLM-driven edits — proposing, reviewing, accepting, and landing on the changed line — as a single continuous motion.

Why

AI editing tools typically hand you a diff, make you leave the editor to review it, then drop the cursor somewhere unhelpful after you accept. Each of those is a context break. You lose your place, you lose the surrounding code you were thinking about, you lose the thread.

Diffusion keeps you in the zone:

  • Your editor, your diff. Syntax-highlighted side-by-side or unified diffs rendered inside Neovim — no external tab, no browser, no modal UI.
  • Spatial continuity. After acceptance you land at the changed line with the edited lines highlighted. Line numbers and relative positions match exactly what you saw in the diff view.
  • Instant response. The buffer updates the moment you accept — you don't wait for a disk write, a file watcher, or a re-read.

Instant Feedback & Instant Navigation

When you accept a diff, diffusion populates the target buffer from the pending change immediately, before any disk I/O happens. The assistant's own file-write (which can be slow, queued behind other work, or delayed by the runtime) continues in the background. Once it lands, diffusion verifies the on-disk content matches what the buffer already shows; any discrepancy — typically an assistant-side rejection or override — triggers a reconciliation.

This separation means:

  • You see the result instantly, not "after the assistant finishes writing."
  • The cursor stays where the diff view put it. Navigation and highlight apply to the same visual line, so your eye doesn't have to re-track.
  • Writes remain authoritative. The assistant still owns the file — diffusion only mirrors what's about to be written, then reconciles if it disagrees.

The loop: propose, read, accept — without breaking your train of thought. You stay looking at the code. The editor stays where you left it. The next change is one keystroke away.

Providers

  • Claude Code — WebSocket MCP, primary integration target
  • OpenCode — HTTP/WebSocket
  • Codex — MCP

Per-provider configuration lives in docs/. Start with docs/installation.md and docs/claude-integration.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages