A Neovim plugin that plays ambient background audio to help you chill while coding.
Install mpv media player:
- Linux:
sudo apt install mpv - macOS:
brew install mpv
Using Lazy.nvim:
{
'JacobACan/chill_nvim',
event = 'VimEnter',
lazy = false,
}The plugin scans two directories for audio files:
plugin/audio/music/- Background music tracksplugin/audio/ambiance/- Ambient sounds (rain, nature, etc.)
On startup, it automatically begins playing random audio from both directories:
- Music: Plays on a random interval (2-5 minutes)
- Ambiance: Plays on a shorter interval (30-120 seconds)
- Each track is randomly selected, avoiding the same file twice in a row
Simply drop audio files into the appropriate directories:
plugin/audio/music/
├── song1.mp3
├── song2.ogg
└── ...
plugin/audio/ambiance/
├── rain.mp3
├── forest.wav
└── ...
Supported formats: .mp3, .ogg, .wav
The plugin works out of the box with sensible defaults. If you'd like to customize it, you can modify the config table in plugin/init.lua:
local config = {
music_interval_min = 300, -- Min seconds between music tracks
music_interval_max = 120, -- Max seconds between music tracks
ambiance_interval_min = 30, -- Min seconds between ambiance sounds
ambiance_interval_max = 120, -- Max seconds between ambiance sounds
music_volume = 70, -- Music volume (0-100)
ambiance_volume = 75, -- Ambiance volume (0-100)
extensions = { '.mp3', '.ogg', '.wav' }, -- Supported audio formats
}If audio doesn't play:
- Ensure
mpvis installed:which mpv - Check Neovim notifications for error messages
- Verify audio files exist in the correct directories
MIT