Initial release - #1
Open
a-mango wants to merge 6 commits into
Open
Conversation
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>
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
Prepares bin.nvim for its first public release.
[error]section); the render generation counter is per-buffer so opening a second binary no longer strands the first on "Loading..."; an emptysectionsconfig renders instead of hanging; output caps now bound the work done, not just the lines shown.binviewfiletype to avoid colliding with the builtin$VIMRUNTIME/syntax/elf.vim.doc/bin.txtwith a LIMITATIONS section, CHANGELOG for 1.0.0.Test plan
nvim --headless -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/ ..."— 10/10 passing locallyluacheck lua/ ftplugin/ tests/— clean