Releases: linguini1/pulse.nvim
One-shot Timers
Features
One-shot Timers
This release introduces one-shot timers; timers which go off a single time and the delete themselves.
These timers can be created by using the :PulseSetTimer <name> <interval>
user command, or by adding a timer using pulse.add
with the one_shot option set to true:
pulse.add("one-shot-timer", { one_shot = true })
New pulse.add()
API
This PR also introduces a new API for adding timers. The previous API required users to remember the order of parameters and provide them all (no defaults were available). The new API only requires that the timer has a name, and provides sensible defaults for all other parameters.
The new API format and its defaults can be found in :h pulse.add()
User-defined Callbacks
The new API also allows users to define their own callbacks to be executed when their timer goes off. The default callback remains as using vim.notify
to display the timer message. Users can now integrate pulse
with nvim-notify
if they so wish!
The callback takes a single parameter, timer
, which is the reference to the timer itself. This allows users to manipulate the timer how they please through their callback.
Multi-select timers in commands
This PR adds the capacity to multi-select timers when using the :PulseEnable
and :PulseStatus
commands. This way, users can disable and enable multiple timers at once.
Command auto-complete
The following commands now have auto complete suggestions for arguments (timer names):
:PulseEnable
:PulseDisable
:PulseStatus
Bug fixes
PulseStatus
returns the remaining time on the timer instead of just the repeat intervalpulse.enable
andpulse.disable
no longer throw errors when used
v1.0.0
pulse.nvim is released!
pulse.nvim is a Neovim plugin for creating and managing timers easily to keep you on track while coding.
Features
Timer options
- Minute interval: how long the timer waits before going off
- Message: The message to display when the timer goes off
- Enabled status: Whether the timer should currently be running or not
Configuration
- Choose the notification level for timer messages
- Enable and disable timers on the fly
- View which timers are currently running
- Add and remove timers on the fly
Get started
Take a look at the help pages to setup and use pulse.nvim in your Neovim config!
:h pulse.nvim