A Neovim plugin that connects Neovim to Cursor's agent via ACP (Agent Client Protocol), providing a Cursor‑like chat and code‑editing experience inside Neovim.
Note: This project is still ongoing and under active development!
- Chat Interface: Two‑buffer layout with read‑only history on the right and a modifiable input buffer, optimized for chatting while keeping your code visible.
- Streaming Responses: Real‑time, token‑by‑token streaming of AI responses using Cursor's ACP implementation (
agent acp), very close to how Cursor desktop behaves. - ACP Integration: Uses Cursor's ACP server instead of the old
cursor-agentstreaming protocol, with a small JSON‑RPC client implemented in Lua. - File & Terminal Tools: Implements ACP filesystem and terminal methods so the agent can read/write files and run commands in your Neovim project (when you allow it).
- Permission Prompts: Neovim UI prompt for
session/request_permissionwhere you can chooseallow-once,allow-always, orreject-oncefor tool calls and commands. - Change View (Current Batch): When a response includes structured edits (via code blocks), the plugin shows a quickfix list of changed files and lets you apply or revert them with simple keybinds.
- Status Indicators: Lightweight status line in the chat buffer showing whether the agent is idle, processing, streaming, or stopped.
- Configurable Chat Layout:
chat_widthand bindings can be customized fromrequire('cursor').setup(...)to match your Neovim UI preferences. - Cursor CLI Integration: Relies on the official Cursor CLI (
agent) so you use the same models, settings, and MCP configuration as in Cursor desktop.
Using lazy.nvim:
require('cursor').setup({
chat_width = 50, -- Width of chat window
model = 'auto', -- Model to use (optional, default: 'auto')
bindings = { -- Keybinding configuration
chat = {
send_message = "<CR>",
close = "q",
stop = "<C-c>",
},
},
})Prerequisites:
- Neovim 0.7+
- Cursor Agent CLI installed (https://cursor.com/blog/cli). The plugin uses Cursor's official CLI which automatically uses your Cursor subscription - no additional costs!