Giter Club home page Giter Club logo

donut.nvim's Introduction

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

donut.nvim's People

Contributors

github-actions[bot] avatar nstefan002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

donut.nvim's Issues

Suggestion: disable the automatic start of the plugin by setting `timeout = 0`

Hi,

First of all, the plugin really looks cool, great job!

One thing: from what I understand, timeout is the "screensaver timeout". I want to disable the automatic screen saver and only do it with the :Donut command.

I thought setting timeout = 0 would achieve this, however, when I do that, it will be running forever, and I can't stop it.

I think it would be nice to have this feature similar to "normal" screensavers that can be disabled

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.