Skip to content

NStefan002/donut.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Donut.nvim

donut.c meets Neovim

Donut.nvim is the Neovim screensaver that spawns a spinning donut in each opened Neovim window.

Note

donut.nvim does not change any of the buffers, it just creates new buffers on top of existing ones and after you press any key it restores your buffers.

📺 Showcase

donut_showcase.mp4

📋 Installation

Note

  • Neovim version >= 0.9.5 is required.
  • No need to call setup function, donut.nvim is ready to use out of the box.
  • Only call setup function if you want to change the default configuration.
  • No need to lazy load it via Lazy.nvim, donut.nvim lazy loads by default.

lazy:

{
    "NStefan002/donut.nvim",
    version = "*",
    lazy = false,
}

rocks.nvim:

:Rocks install donut.nvim

⚙️ Configuration

Default configuration
{
    timeout = 300,
    sync_donuts = false,
}


If you want to change the default configuration, you can call the setup function.

require("donut").setup({
    timeout = 60, -- set to 0 to disable (can still be triggered manually with :Donut command)
    sync_donuts = true,
}

or you can just set vim.g.donut_config to a table with the configuration you want.

vim.g.donut_config = { timeout = 30, sync_donuts = false }

❓ How does it work?

  • After the timeout, donut.nvim will spawn a donut for each opened window.
  • When you press any key, donut.nvim will clear all the donuts and restore your buffers.
  • If you have sync_donuts set to true, the donuts will spin in sync.
  • If you want to manually trigger the donuts, you can call :Donut command.

🎭 Inspiration

Other Neovim screensavers