Repository navigation
feat(neovim): blackbox.nvim — Blackbox for Neovim on nvim-dap - #1
Open
akash-aman wants to merge 2 commits into
Open
akash-aman wants to merge 2 commits into
akash-aman wants to merge 2 commits into
Conversation
Adds the Neovim window side of Blackbox, in Lua on top of nvim-dap. It speaks the same window protocol as the VS Code extension (private socket + registry entry in /tmp/blackbox-<uid>/, newline-delimited JSON requests), so the existing MCP server lists Neovim next to VS Code, Cursor and Antigravity windows with no server changes. An AI tool started in Neovim's :terminal is matched to that Neovim automatically. - Implements all 31 non-ide tools from schema/tools.json plus window_status: breakpoints (source, function, hit counts, logpoints, enable/disable), start by launch configuration name (.vscode/ launch.json and dap.configurations), wait for stop, step/continue/ pause/run-to-line, threads, frames, variables, evaluate, inspect, set variable, watches, source context, output, editor and workspace tools. - Events hub ported from debugEvents.ts onto dap.listeners: per-thread pause state, output buffer with size limits and filtering, waits armed before requests, `next`. - debug_start reports a refused launch with the adapter's reason and explains a start that never comes up instead of hanging. - Robust against sessions that end without a terminated event (via on_close), requests on closed sessions, JSON null arguments, nested node_modules, partial buffer-name matches, child sessions. - :BlackboxStatus and :BlackboxCopyMcpConfig; :help blackbox. Tests: 31 Lua unit tests (plenary) and a new editor-independent conformance suite (editors/conformance) that drives a headless Neovim through the real MCP server against a Go fixture debugged by delve (7 tests). CI: .github/workflows/neovim.yml on Linux and macOS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds blackbox.nvim, the Neovim side of Blackbox, built in Lua on top of nvim-dap. It speaks the same window protocol as the VS Code extension (a private socket and registry entry in
/tmp/blackbox-<uid>/), so the existing MCP server lists Neovim windows next to VS Code, Cursor and Antigravity ones, with no server changes.ide_*tools fromschema/tools.json, pluswindow_status:.vscode/launch.jsonanddap.configurations);:terminaluses that Neovim automatically.debug_startreports a refused launch with the adapter's own reason, and explains a start that never comes up instead of hanging.:BlackboxStatus,:BlackboxCopyMcpConfig, and:help blackbox.Testing
Lua unit tests: 31, run with plenary. They cover the events hub, protocol/private folder, server framing, breakpoint stores, request failure on session close, and argument handling.
New conformance suite (
editors/conformance, 7 tests): it drives a headless Neovim through the real MCP server, against a Go fixture debugged by delve. Steps covered:The suite is editor-independent, so a future JetBrains plugin can reuse it.
CI:
.github/workflows/neovim.ymlruns both on Linux and macOS.Manual: run in a real Neovim config against a WordPress site with Xdebug: start by name, breakpoint, step into, function breakpoint on
wp(), set$query_vars, stop. Also tested with Go/delve.VS Code: its unit tests are unchanged and pass (104).
Notes
~/.blackbox/blackbox-mcp.js). A standalone npm package for Neovim-only users is a follow-up.blackbox.nvimrepo, also a follow-up. Until then, install it withdir = ".../editors/neovim".feat/**branches.