
brygga.nvim
Bridge from Neovim to Claude Code /ide
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up brygga.nvim (git-clone project) into my current project. Found on https://claudeers.com/brygganvim Repo: https://github.com/ThorstenRhau/brygga.nvim Homepage/docs: — Detected install method: git-clone → git clone https://github.com/ThorstenRhau/brygga.nvim Category: other. Platforms: cli, api. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: active; community-verified: false. Confirm the source before running anything.
git clone https://github.com/ThorstenRhau/brygga.nvim
// compatibility
| Platforms | cli, api |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | BSD-3-Clause |
| Pricing | open-source |
| Language | Lua |
brygga
Brygga means "bridge" in Swedish. It lets Claude Code use Neovim as its IDE,
the same way it uses the VS Code and JetBrains extensions. Start claude, type
/ide, and Claude can see your selection, your diagnostics and your open
files. When it asks permission to edit a file, the edit opens as a diff in
Neovim.
brygga is pure Lua, has no dependencies and needs Neovim 0.12 or newer.
brygga is built to stay out of your way. Its MCP, diff and SHA-1 code loads
only when Claude first needs it, so it adds little to Neovim's startup. The
server runs on vim.uv, so it does not block the editor. Selection and
diagnostic updates are debounced, which sends one message after a burst of
cursor moves or LSP changes.
Features
- Claude sees your selection and follows it as the cursor moves.
- A visual selection stays after
<Esc>until the cursor moves, so you can switch to Claude without losing it. - Edits that Claude asks permission for open as a side-by-side diff in a new tab.
- Claude reads LSP diagnostics and is told when they change.
:Brygga sendadds the current file or a range of lines to Claude's prompt as an @-mention.- Claude can open files, list open buffers and workspace folders, check for unsaved changes and save documents.
Install
Both examples follow the tagged releases instead of the latest commit on
main.
With vim.pack:
vim.pack.add({
{ src = 'https://github.com/ThorstenRhau/brygga.nvim', version = vim.version.range('*') },
})
require('brygga').setup()
With lazy.nvim, opts makes lazy call setup():
{ 'ThorstenRhau/brygga.nvim', version = '*', opts = {} }
Usage
setup() starts the server. It has one option:
require('brygga').setup({
-- Start the server when setup() runs.
auto_start = true,
})
You can skip setup() and run :Brygga start when you want the server.
Connect Claude Code
- In a Neovim
:terminal, runclaude. It connects on its own, because brygga setsCLAUDE_CODE_SSE_PORTin Neovim's environment. - In another terminal, run
claudefrom a directory inside Neovim's working directory or an LSP workspace root. Then type/ideand pick Neovim, or start withclaude --ide.
Commands
| Command | What it does |
|---|---|
:Brygga or :Brygga status | Shows the port, the number of connected clients and the lock file |
:Brygga start | Starts the server |
:Brygga stop | Stops the server and removes the lock file |
:Brygga send | Adds the current file to Claude's prompt as an @-mention |
:'<,'>Brygga send | Adds only the selected lines |
A keymap for sending a visual selection:
vim.keymap.set('x', '<leader>cs', ':Brygga send<CR>', { desc = 'Send selection to Claude' })
Pressing : in visual mode fills in the range for you.
Review edits
When Claude proposes a change, brygga opens a new tab with the file on the left and the proposal on the right.
:win the proposed buffer accepts the change. You can edit the proposal first. Claude then writes the file.:qrejects the change.
If the file has unsaved changes in Neovim, brygga does not open the diff. Save the file and ask Claude again.
When diffs appear
- Claude Code asks Neovim for a diff only when it needs your approval. That is the default permission mode. In accept edits, auto and bypass permissions modes it writes the file directly, so no diff opens. Everything else, such as diagnostics, still works.
- Only the Edit and Write tools open diffs. A file changed by a shell command,
such as
sedor a heredoc, never does. - An edit without a diff still changes the file on disk. Set
autoreador run:checktimeto load it into the open buffer.
How it works
brygga runs a WebSocket server on 127.0.0.1 with a random port and a random
auth token. It writes a lock file to ~/.claude/ide/<port>.lock (or
$CLAUDE_CONFIG_DIR/ide) with mode 0600. Claude Code reads that file to find
the server and the token. brygga removes the file when Neovim exits.
The lock file lists Neovim's working directory and the LSP workspace roots.
/ide offers Neovim only when Claude's directory is inside one of them.
sequenceDiagram
participant N as Neovim (brygga)
participant L as Lock file
participant C as Claude Code
N->>L: Write port, token and workspace folders
N->>N: Set CLAUDE_CODE_SSE_PORT for :terminal
C->>L: Pick the lock file (/ide, --ide or CLAUDE_CODE_SSE_PORT)
C->>N: Connect over WebSocket with the token
par Neovim to Claude, at any time
N-->>C: Selection and diagnostics changes
N-->>C: :Brygga send as an @-mention
and Claude to Neovim, when it needs to
C->>N: Tool calls (open files, list buffers, save, ...)
C->>N: openDiff with the proposed edit
N-->>C: :w accepts the change, :q rejects it
end
N->>L: Remove the lock file on exit
Claude Code decides which tools to call. Today the model reads diagnostics
directly, and the CLI uses the other tools internally. brygga does not support
Jupyter executeCode.
Troubleshooting
/ide does not list Neovim:
- Run
:checkhealth brygga. It checks the Neovim version, theclaudecommand, the lock file and the proxy settings, and says how to fix each problem. - Run
:Brygga statusto see if the server is running. - Start
claudefrom a directory inside Neovim's working directory or an LSP workspace root. - Look for the lock file in
~/.claude/ide/. - If you set an HTTP proxy variable, add
localhost,127.0.0.1tono_proxy.
If an edit opens no diff, see When diffs appear.
Development
make check # stylua format check, selene lint, headless tests
make test # headless tests only
License
BSD 3-Clause
Acknowledgments
The protocol notes in coder/claudecode.nvim were a useful reference.
// faq
What is brygga.nvim?
Bridge from Neovim to Claude Code /ide. It is open-source on GitHub.
Is brygga.nvim free to use?
brygga.nvim is open-source under the BSD-3-Clause license, so it is free to use.
What category does brygga.nvim belong to?
brygga.nvim is listed under other in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/brygganvim)
// retro hit counter
[](https://claudeers.com/brygganvim)
// reviews
// guestbook
// related in Other
Anti-AI-slop design skill for Claude Code, Cursor, and Codex.
Huashu Design · HTML-native design skill for Claude Code · Claude Code 里 HTML 原生的设计 skill · 高保真原型 / 幻灯片 / 动画 + 20 设计哲学 + 5 维评审 + MP4 导出 · Agent-agnostic
Open source Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents. Built for multitasking, organization, and programmability.