spinner.nvim is a single file, no-dependency plugin for Neovim. It's easy to add to your Lua project for better organization.
To install spinner.nvim, simply move the spinner.lua
file from this repository to a subdirectory in your Lua project directory. Once transferred, you can adjust the configuration table at the beginning of the file to suit your needs.
Here's a basic example of how to use spinner.nvim:
local spinner = require('YOUR_PROJECT.spinner')
-- Display the spinner at the top right of the screen
spinner.show()
-- Or customize the position
spinner.show({
relative = "editor",
width = 1,
height = 1,
col = vim.o.columns - 1,
row = vim.o.rows - 1,
})
-- Hide the spinner when it's done
spinner.hide()
You can customize the following values:
-- User configuration section
local config = {
-- Show a notification when done (set to false to disable)
show_notification = true,
-- Name of the plugin
plugin = "spinner.nvim",
-- Spinner frames
spinner_frames = {
"⠋",
"⠙",
"⠹",
"⠸",
"⠼",
"⠴",
"⠦",
"⠧",
"⠇",
"⠏",
},
}
If you find spinner.nvim helpful, please consider giving it a star! ⭐️