Skip to content

Initial release - #1

Open
a-mango wants to merge 6 commits into
mainfrom
v1-release-prep
Open

Initial release#1
a-mango wants to merge 6 commits into
mainfrom
v1-release-prep

Conversation

@a-mango

@a-mango a-mango commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Prepares bin.nvim for its first public release.

  • Runtime fixes: a missing tool no longer crashes the open (vim.system throws synchronously when the executable is absent — now routed into an [error] section); the render generation counter is per-buffer so opening a second binary no longer strands the first on "Loading..."; an empty sections config renders instead of hanging; output caps now bound the work done, not just the lines shown.
  • binview filetype: inspection buffers use a private binview filetype to avoid colliding with the builtin $VIMRUNTIME/syntax/elf.vim.
  • Tests: plenary/busted suite (10 specs) covering ELF detection, checksec parsing, end-to-end render, the BufReadPost entry path, orphan cleanup, and regressions for the fixes above.
  • CI: luacheck + informational stylua, and a test matrix on Neovim stable and nightly.
  • Docs & release: README with demo gif, doc/bin.txt with a LIMITATIONS section, CHANGELOG for 1.0.0.

Test plan

  • nvim --headless -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/ ..." — 10/10 passing locally
  • luacheck lua/ ftplugin/ tests/ — clean
  • Lint job validated locally under act
  • Full matrix green on GitHub Actions (this PR)

a-mango and others added 6 commits June 8, 2026 21:19
Move the inspection buffers to a private `binview` filetype. The previous
`elf` filetype collided with the builtin $VIMRUNTIME/syntax/elf.vim, which
shadowed the plugin's own highlighting and was the reason the original code
leaned on window-local matchadd (which accumulated on reload and bled onto
other buffers). Highlighting now lives in a buffer-local syntax/binview.vim.

Also harden M.open:
- per-buffer generation counter, so opening a second binary no longer
  supersedes and strands the first on "Loading..."
- pcall-guard the section dispatch: vim.system throws synchronously when a
  tool is absent, so an unguarded readelf would abort the whole open with a
  traceback. It now degrades to an [error] section, honouring the documented
  "missing tool leaves a notice" contract.
- guard an empty `sections` list, which otherwise hung on "Loading..." forever
- stream the line cap so a config limit bounds the work, not just the display
  (a debug build's multi-million-line DWARF no longer materialises in full)

Health now reports the real Neovim 0.10 floor (vim.system).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bring README and the help file in line with the code: the binview filetype,
the Neovim 0.10 floor, the :Bin commands and the keymaps. Add a LIMITATIONS
note explaining that detection on BufReadPost reads the whole binary first, a
Demo placeholder pointing at demo.tape, and a line on help tag generation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Covers is_elf detection, checksec CSV parsing (including the empty-field case),
end-to-end render into a binview buffer, the empty-sections guard, and a
regression test that two binaries opened back to back both render rather than
the first being stranded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lint with luacheck and run the suite under Neovim stable and nightly. The lint
job uses PUC Lua 5.4 rather than LuaJIT, since luarocks fails to load the large
luarocks.org manifest under LuaJIT ("more than 65536 constants"). stylua runs
as an informational check only, since it would collapse the deliberate column
alignment in the config tables.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Record the demo with a clean Neovim (no user config or plugins, only bin.nvim
on the runtimepath) so it shows the plugin and nothing else. The vhs script
that produced it stays local and is gitignored rather than shipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The other specs drive M.open directly; this one exercises what actually happens
when a user runs `nvim <binary>`: the autocmd fires, the inspection buffer is
swapped in, and the raw binary buffer is wiped so `q` lands on a real buffer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant