Claude Code editor integration

code-preview.nvim

Neovim plugin that previews Claude Code's file edits as diffs before you accept them.

185 stars 22 forksEditor integrations Source

Install

From source
git clone https://github.com/Cannon07/code-preview.nvim.git

From the README

code-preview.nvim

Review every edit your AI coding agent makes as a native Neovim diff — before it's written to disk.

Works with Claude Code, OpenCode, GitHub Copilot CLI, and OpenAI Codex CLI — on macOS, Linux, and Windows.

Demo
Shown with Claude Code. OpenCode, GitHub Copilot CLI, and Codex CLI work the same way — expand 📺 More demos below.

Why

Your AI coding agent proposes edits in its terminal — a cramped, scroll-past diff you have to eyeball before typing y. code-preview.nvim intercepts that moment and opens the proposed change as a real Neovim diff: full syntax highlighting, your colorscheme, your keymaps. Review it like any other diff, then accept or reject in the agent's CLI as usual.

- 🔍 See edits as native diffs — side-by-side or GitHub-style inline, before anything touches disk
- 🤝 Agent-agnostic — Claude Code, OpenCode, Copilot CLI, Codex CLI, with more agents planned
- 🌳 Neo-tree integration — your file tree marks what's being modified, created, or deleted
- 🪶 No Python — file transforms run through nvim --headless -l; the only hard dep is Neovim 0.10+

📺 More demos

OpenCode

GitHub Copilot CLI

OpenAI Codex CLI

Neo-tree integration

Install

With lazy.nvim:

Manual (path-based)

Requirements: Neovim >= 0.10. Each agent has a couple of extra needs — see below.

Per-agent requirements

On Windows, the Copilot CLI hook runs under PowerShell 7+ and needs no jq.

Quick start

After setup(), the flow is the same for every agent:

1. Open your project in Neovim.
2. Install the agent's hooks (one command — pick your agent below) and restart that agent's CLI.
3. Ask the agent to edit a file — a diff preview opens automatically in Neovim.
4. Review it, then accept or reject in the agent. On accept, the preview closes automatically.

Then run the one…
Read the full README on GitHub

Details

Language
Lua
License
MIT
Last updated
12 June 2026
Topics
claudeclaude-codecodexcodex-clicopilot-cli-plugingithub-copilot-clineovimnvim-pluginopencodepreviewtmux

FAQ

What is code-preview.nvim?

Neovim plugin that previews Claude Code's file edits as diffs before you accept them. It is a editor integration for Claude Code, from Cannon07/code-preview.nvim on GitHub.

How do I install code-preview.nvim?

Clone Cannon07/code-preview.nvim from GitHub and follow the setup steps in its README.

Is code-preview.nvim popular?

Cannon07/code-preview.nvim has 185 GitHub stars and 22 forks. It was last updated on 12 June 2026.

More editor integrations

Browse the most popular Claude Code mods, all editor integrations, or the skills and MCP server directories.