Skip to content

Releases: TimboGP/animfx.nvim

v0.3.1

Choose a tag to compare

@TimboGP TimboGP released this 05 Jul 13:23

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 of cursor_beacon.
  • cursor_ripple — an expanding pulse that grows outward from the cursor while fading (a dissipating ring); the outward twin of cursor_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

Choose a tag to compare

@github-actions github-actions released this 04 Jul 09:09

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 affecting on() calls.
  • effects.range_flash highlights 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 with range_flash, this reimplements yank highlighting
    through the registry (see examples/yank-highlight.lua).
  • effects.blink (flash a line on/off N times) and effects.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_macros opts back in).
  • More sources: sources.on_diagnostic() (emits "Diagnostic" with
    { buf, count }) and sources.on_search() (wraps n/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.
    See examples/harpoon-add.lua. Verified against real harpoon in the
    integration suite.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 07:05

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.md describing 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.DelegateSpec class.
  • 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 --clean so results don't depend on the
    user's config.

Fixed

  • line_flash/sign_flash now clamp an out-of-range data.line into the
    buffer instead of raising (e.g. when data.buf is set but data.line falls
    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.
  • delegate now warns once (via vim.notify) when the module loads but the
    fn path isn't callable, instead of silently doing nothing.
  • Animated effects (line_flash fade, cursor_beacon) now cancel their
    repeating timers on VimLeavePre, so none leak or fire a callback into a
    closing Neovim.

v0.1.0

Choose a tag to compare

@TimboGP TimboGP released this 03 Jul 19:03

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, with fade = true for a stepped fade-out; extmark-based, no leaks across rapid re-triggers
  • sign_flash — gutter sign, visible even when the line is off-screen
  • cursor_beacon — dependency-free floating pulse (same visual as pulsar/beacon)
  • notify_toast — animated toast via nvim-notify, falls back to vim.notify
  • delegate — 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.