claudeers.
// Other

brygga.nvim

Bridge from Neovim to Claude Code /ide

// Other[ cli ][ api ][ claude ]#claude#other◷ BSD-3-Clause$open-sourceupdated about 1 month ago
Actively maintained
96/100
last commit 19 days ago
last release none
releases 0
open issues 0
// star history

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.
// or clone
git clone https://github.com/ThorstenRhau/brygga.nvim

// compatibility

Platformscli, api
Operating systems—
AI compatibilityclaude
LicenseBSD-3-Clause
Pricingopen-source
LanguageLua

Get your FREE $2.50 API credits to access TickAtlas financial data ↗

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 send adds 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, run claude. It connects on its own, because brygga sets CLAUDE_CODE_SSE_PORT in Neovim's environment.
  • In another terminal, run claude from a directory inside Neovim's working directory or an LSP workspace root. Then type /ide and pick Neovim, or start with claude --ide.

Commands

CommandWhat it does
:Brygga or :Brygga statusShows the port, the number of connected clients and the lock file
:Brygga startStarts the server
:Brygga stopStops the server and removes the lock file
:Brygga sendAdds the current file to Claude's prompt as an @-mention
:'<,'>Brygga sendAdds 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.

  • :w in the proposed buffer accepts the change. You can edit the proposal first. Claude then writes the file.
  • :q rejects 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 sed or a heredoc, never does.
  • An edit without a diff still changes the file on disk. Set autoread or run :checktime to 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, the claude command, the lock file and the proxy settings, and says how to fix each problem.
  • Run :Brygga status to see if the server is running.
  • Start claude from 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.1 to no_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.

4 views
★ 20 stars
unclaimed
updated about 1 month ago

// embed badge

brygga.nvim on Claudeers
[![Claudeers](https://claudeers.com/api/badge/brygganvim.svg)](https://claudeers.com/brygganvim)

// retro hit counter

brygga.nvim hit counter
[![Hits](https://claudeers.com/api/counter/brygganvim.svg)](https://claudeers.com/brygganvim)

// reviews

// guestbook

0/500

// related in Other

🔓

符合nature论文学术表达和科研绘图的Skill

// otherYuan1z0825/⟨Python⟩★ 54,085◷ Apache-2.0[ claude ]
🔓

Anti-AI-slop design skill for Claude Code, Cursor, and Codex.

// otherNutlope/⟨CSS⟩★ 49,642◷ MIT[ claude ]
🔓

Huashu Design · HTML-native design skill for Claude Code · Claude Code 里 HTML 原生的设计 skill · 高保真原型 / 幻灯片 / 动画 + 20 设计哲学 + 5 维评审 + MP4 导出 · Agent-agnostic

// otheralchaincyf/⟨HTML⟩★ 28,944◷ MIT[ claude ]
🔓

Open source Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents. Built for multitasking, organization, and programmability.

// othermanaflow-ai/⟨Swift⟩★ 28,842◷ NOASSERTION[ claude ]
→ see how brygga.nvim connects across the ecosystem