Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tetzng/random-colorscheme.nvim
A Neovim plugin that sets your colorscheme to a random one.
https://github.com/tetzng/random-colorscheme.nvim
neovim neovim-plugin
Last synced: 4 days ago
JSON representation
A Neovim plugin that sets your colorscheme to a random one.
- Host: GitHub
- URL: https://github.com/tetzng/random-colorscheme.nvim
- Owner: tetzng
- License: apache-2.0
- Created: 2023-09-27T05:55:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-27T06:50:15.000Z (over 1 year ago)
- Last Synced: 2024-12-25T04:45:55.988Z (9 days ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# random-colorscheme.nvim
`random-colorscheme.nvim` is a Neovim plugin that sets your colorscheme to a random one from the list of available colorschemes or a list provided by the user.
## Installation
Use your favorite package manager to install this plugin. For example, with [lazy.nvim]('https://github.com/folke/lazy.nvim'):
```lua
{
'tetzng/random-colorscheme.nvim',
opts = true,
}
```## Configuration
```lua
{
'tetzng/random-colorscheme.nvim',
lazy = false,
dependencies = {
"folke/tokyonight.nvim",
"rebelot/kanagawa.nvim",
{
"catppuccin/nvim",
name = "catppuccin",
}, -- Your favorite colorscheme plugins here
},
---@class RandomColorscheme.UserConfig
opts = {
colorschemes = {
"tokyonight-moon",
"catppuccin-macchiato",
"kanagawa-dragon",
}, -- default: all available colors
set_on_load = true, -- default: true
},
keys = {
{ "cc", function() require("random-colorscheme").set() end, desc = "Set Random Colorscheme" },
},
}
```Default Settings
```lua
{
colorschemes = , ---@type string[]|nil
set_on_load = true, ---@type boolean
}
```## Usage
After installation, the colorscheme will be set to a random one on every Neovim startup if the `set_on_load` config is set to `true` (which is the default behavior).
You can also set a random colorscheme anytime by calling:
```vim
:lua require('random-colorscheme').set()
```If you wish to provide your own list of colorschemes:
```vim
:lua require('random-colorscheme').set({'default', 'tokyonight-night', 'kanagawa-wave'})
```