Releases: TimboGP/animfx.nvim
Release list
v0.3.1
Added
Four new dependency-free effect constructors:
cursor_implode— an inverse pulse that homes in on the cursor: a wide, faint floating box that contracts and solidifies onto the cursor position. The reverse ofcursor_beacon.cursor_ripple— an expanding pulse that grows outward from the cursor while fading (a dissipating ring); the outward twin ofcursor_implode.column_sweep— a highlighted band that scans left→right across a line, then clears.breathe— swells a line's background toward a color and recedes back, a soft in-and-out glow; falls back to a plain flash when the highlight group has no background.
All reuse the existing shared scratch-buffer / managed-timer / blend machinery, so nothing new leaks on exit.
Full changelog: v0.3.0...v0.3.1
v0.3.0
Added
animfx.setup(config)registers effects declaratively — a table mapping
events to an effect or a list of them. Re-running replaces its own
registrations without affectingon()calls.effects.range_flashhighlights an arbitrary column-aware range, falling
back to the'[/']change marks; clamps out-of-range coordinates.animfx.sources— curated, opt-in adapters that emit animfx events from
Neovim happenings. First source:on_yank()(emits"Yank"with the yanked
range). Combined withrange_flash, this reimplements yank highlighting
through the registry (seeexamples/yank-highlight.lua).effects.blink(flash a line on/off N times) andeffects.virt_badge
(end-of-line virtual-text label that clears after a duration).animfx.enable()/animfx.disable()/animfx.is_enabled()global switch.
Effects are also skipped during macro record/replay by default
(vim.g.animfx_animate_in_macrosopts back in).- More sources:
sources.on_diagnostic()(emits"Diagnostic"with
{ buf, count }) andsources.on_search()(wrapsn/N, emits"Search"
with the landing position). effects.shake— jitters a floating cue at the cursor (best-effort error
feedback; Neovim can't move a non-floating window).sources.on_harpoon()— the motivating integration: emits"HarpoonAdd"
when a file is added to a harpoon list (v2), no-op if harpoon is absent.
Seeexamples/harpoon-add.lua. Verified against real harpoon in the
integration suite.
v0.2.0
Added
- OpenSpec specs under
openspec/documenting v0.1.0 behavior across five
capabilities (registry, effects, combinators, introspection, remote). - Spec-to-test traceability: every test is tagged with the requirement it
covers, and a coverage gate fails the build on dangling references or
uncovered requirements. CONTRIBUTING.mddescribing the spec-driven loop and traceability rule.- Backend-integration suite (
make test-integration) that installs a real
nvim-notify and verifies the adapters, the remote bridge end-to-end, and the
health check. - This changelog and a release workflow that cuts a GitHub release from the
matching changelog section on tag push. - lua-language-server type-checking of the LuaCATS annotations (
.luarc.json,
make typecheck, CI job);delegate's spec is now a typed
animfx.DelegateSpecclass. animfx.clear(event)removes all effects for an event, or every animfx
registration when called with no argument.- Vim help documentation (
:help animfx,doc/animfx.txt).
Changed
- The unit suite now runs with
nvim --cleanso results don't depend on the
user's config.
Fixed
line_flash/sign_flashnow clamp an out-of-rangedata.lineinto the
buffer instead of raising (e.g. whendata.bufis set butdata.linefalls
back to a longer buffer's cursor line).- Concurrent
line_flash({ fade = true })invocations no longer share global
highlight groups, so overlapping fades with different colors don't overwrite
one another mid-animation. delegatenow warns once (viavim.notify) when the module loads but the
fnpath isn't callable, instead of silently doing nothing.- Animated effects (
line_flashfade,cursor_beacon) now cancel their
repeating timers onVimLeavePre, so none leak or fire a callback into a
closing Neovim.
v0.1.0
First tagged release of animfx.nvim — an event-triggered animation registry that decouples "something happened" from "what visual effect plays." Call sites emit named events; effects register against event names independently. Rides Neovim's built-in User autocmd, so everything stays introspectable via :au User.
Core
animfx.on(event, fn)/emit(event, data, opts)/off(id)— register, fire, unregister- Effects are
pcall-isolated: one throwing effect never blocks the others - Multiple effects per event, run in registration order
emit(…, { schedule = true })defers effects to the next tick so a slow effect never blocks the emitting keymap
Effects (animfx.effects)
line_flash— full-line highlight flash, withfade = truefor a stepped fade-out; extmark-based, no leaks across rapid re-triggerssign_flash— gutter sign, visible even when the line is off-screencursor_beacon— dependency-free floating pulse (same visual as pulsar/beacon)notify_toast— animated toast via nvim-notify, falls back tovim.notifydelegate— wrap any other plugin's function as an effect, with graceful fallback
Combinators (animfx.combinators)
chain, delay, debounce, throttle, only_if, once — compose the function(data) effect shape freely.
Introspection
list()/history()and:AnimfxList,:AnimfxEmit <Event>,:AnimfxHistory:checkhealth animfx
Cross-layer bridge (animfx.remote)
Let external processes emit into a running Neovim over its RPC socket. Ready-to-wire AeroSpace and tmux hook scripts in examples/.
Quality
- 26 headless tests (
make test), CI on Neovim stable + nightly - stylua / luacheck config for local dev
Full detail in the README.