Skip to content

javiorfo/nvim-spinetta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-spinetta

nvim-spinetta is a Neovim library written in Lua for using a spinner during a job process.

Caveats

  • This library has been developed on and for Linux following open source philosophy.

Installation

Packer

use 'javiorfo/nvim-spinetta'

Lazy

{ 'javiorfo/nvim-spinetta' }

Overview

Feature nvim-spinetta NOTE
Spinners ✔️ Includes 6 spinners
Set your own spinner ✔️
Set a job ✔️
Set a another process not only a job ✔️
start function ✔️ Several overloads
On success option ✔️ By the user
On interruption option ✔️ By the user or by an internal error

Usage

  • By default the values by parameters are:
{
    spinner = DEFAULT_SPINNER, -- List of figures to use in the spinner
    speed_ms = 200,            -- Speed of the spinner in miliseconds
    main_msg = "",             -- Initial message in spinner
    on_success = nil,          -- Function to implement when the job is finished
    on_interrupted = nil       -- Function to implement when the job is interrupted
}
  • First, create a instance:
    local spinetta = require'spinetta'
    local my_spinner = spinetta:new()
  • Second, start the spinner and the job:
    local my_job = "curl https://host/path" -- This is ilustrative, change it by your job to run
    my_spinner:start(spinetta.job_to_run(my_job))

SPINNERS

  • Check the spinners availables in this file
  • You can add your own spinner if you like. Further information in :help spinetta

Screenshots

Examples of the differents spinners included in this plugin. Run :luafile % in this file

spinetta

Examples of interruption message included in this plugin. Run :luafile % and interrupt the process with Ctrl-C in this file

spinetta

NOTE: The colorscheme nebula from nvim-nyctophilia is used in this image.


Donate

  • Bitcoin (QR) 1GqdJ63RDPE4eJKujHi166FAyigvHu5R7v
  • Paypal

About

Neovim library written in Lua for using a spinner during a job process

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages