Added
- Range preview. Typing
:N,M{cmd}now highlights the whole line range, so a
destructive command such as:50,80dcan be checked before it runs. Neovim
previews:substitutethroughinccommandbut nothing else, so:d,:y,
:m,:tand:gpreviously had no preview at all. The lower bound is also
peeked, so the start of the range is on screen; that is where:dleaves the
cursor, while:ydoes not move it and:m,:tand:sfinish near their
destination. Reversed bounds
are accepted, endpoints may use.,$and arithmetic (:.,+5,:30,$),
and mark or search ranges are left to Vim untouched. Both Ex separators work:
,counts an offset from the cursor and;counts it from the address before
it, so:5;+3is 5 through 8. When more than two addresses are given, Ex acts
on the last two, so:5,10,15dhighlights 10 through 15 rather than the lines
that survive. Controlled by the new
range_peekoption, on by default; the highlight group isNumbRange, linked
toVisualunless you define your own. The highlight belongs to the buffer,
so it appears in every split showing that buffer, while the cursor and the
window options stay per window as before. - Vimdoc help file, so
:h numbworks from inside Neovim. Every option and
public function has its own tag (:h numb-options,:h numb.setup()), and CI
derives the required tags from the Lua sources, so adding an option without
documenting it fails the build.doc/tagsis generated by your plugin manager
and is not tracked. require('numb').get_config(), returning a copy of the configuration in
effect with defaults merged in. Statusline components and other integrations
previously had no way to read it without reaching into plugin internals.:checkhealth numb. Reports the Neovim version against the supported floor,
where the plugin was loaded from and whether a second copy is shadowing it,
whether it is set up, and the active configuration so a pasted health report
is self-contained. Being disabled on purpose is reported as a warning, not an
error.disable_for_buftypeanddisable_for_filetype, lists ofbuftypeand
filetypevalues to leave alone. A window showing one of them is never peeked
in, which is what you want for buffers a plugin owns. Both default to empty,
terminal buffers included: Vim performs:15in a terminal buffer exactly as
it does anywhere else, so excluding one means accepting a jump that happens
with nothing shown before it. Invalid values are reported like any other
option, including a list that holds something other than strings.- A load guard and a way to opt out of loading. numb.nvim sets
vim.g.loaded_numb
when it loads and returns early when it is already set, so sourcing
plugin/numb.luaagain no longer callssetup()with no arguments and resets
the options you had configured. Setting
vim.g.loaded_numb = 1before startup keeps the plugin from loading at all,
including the:Numbcommand. - The Ex line symbols
$(last line) and.(current line) are now previewed,
including arithmetic on either of them::$,:$-3,:.,:.+5. Previously
only digits and signs were recognised, so:$produced no preview at all.
Changed
setup()now reports invalid configuration instead of accepting it silently.
An unknown option name is ignored with a warning, and a value of the wrong
type falls back to its default with a warning. Previously both were accepted
without any message, so a typo such asshow_nubmerslooked like it had
worked (#26). Invalid configuration never raises, so a typo cannot leave the
plugin uninstalled.
Removed
require('numb').on_cmdline_changed()andrequire('numb').on_cmdline_exit()
are no longer part of the module. They are the plugin's own autocommand
callbacks, exported only so the autocommands could reach them, and the help
file said there was no reason to call them. They are now local and wired
straight into the autocommands. If you were calling them, open an issue and
they can come back.
Fixed
- Confirming a command that deletes lines near the end of the buffer, such as
:38,40din a 40 line buffer, no longer reports
Invalid cursor line: out of range. The jump is applied after the command has
run, so the target is now clamped to the buffer as it is at that point. disable()during an active peek no longer leaves the peeking window behind.
Previously thenumber,cursorline,foldenableandrelativenumber
values used while peeking stayed applied, the cursor stayed on the peeked
line, andvim.w.numb_peekingstayed set, so a statusline using
is_peeking()reported a peek forever.- Peeking in a background window no longer scrolls the window you are actually
in. View restoration and centering now target the peeked window rather than
the current one. - Closing a window while it is peeking no longer leaves its saved state behind
for the rest of the session.