Awesome
π¨ RandTheme.nvim
<a href="https://dotfyle.com/plugins/Styzex/RandTheme.nvim"> <img src="https://dotfyle.com/plugins/Styzex/RandTheme.nvim/shield" /> </a>RandTheme is a Neovim plugin that automatically sets a new theme every day, adding variety to your coding experience.
β¨ Features
- π§ Auto-Detection: Detects your installed themes.
- ποΈ Daily Theme Change: Automatically changes your theme daily.
- βοΈ Easy Setup and Usage
π¦ Installation
Choose your preferred plugin manager:
π¦ packer.nvim
use 'Styzex/RandTheme.nvim'
π¦ vim-plug
Plug 'Styzex/RandTheme.nvim'
π¦ lazy.nvim
{
"Styzex/RandTheme.nvim",
event = "VimEnter",
config = function()
require("randtheme").setup()
end
}
π Usage
RandTheme works out of the box. Once installed, it will automatically set a new theme each day when you start Neovim.
If you want to manually trigger a theme change, you can call:
:lua require('randtheme').setup_daily_theme()
βοΈ Configuration
By default, RandTheme doesn't require any configuration. However, if you want to customize its behavior, you can use the setup
function:
require('randtheme').setup({
-- Your configuration options here
})
π§ Options
exclude_themes
: A table of theme names to exclude from random selection.change_on_startup
: If set totrue
, changes the theme when Neovim starts.print_theme_name
: If set totrue
, prints the name of the selected theme.change_interval
: Number of days between automatic theme changes (default is 1).colorscheme_dir
: Specify a custom directory to search for colorschemes. If not set, RandTheme will use Neovim's default colorscheme locations.include_builtin_themes
: If set totrue
, includes Neovim's built-in themes in the random selection. Default isfalse
.reroll_keymap
: Set a keymap for manually changing the theme.
π¦ packer.nvim
use {
'Styzex/RandTheme.nvim',
config = function()
require('randtheme').setup({
exclude_themes = {},
change_on_startup = true,
print_theme_name = true,
change_interval = 1,
colorscheme_dir = "~/.config/nvim/colors",
include_builtin_themes = false,
reroll_keymap = "<leader>tr",
})
end
}
π¦ vim-plug
example config:
Plug 'Styzex/RandTheme.nvim'
" Add this to your init.vim or .vimrc after the Plug commands
lua << EOF
require('randtheme').setup({
exclude_themes = {},
change_on_startup = true,
print_theme_name = true,
change_interval = 1,
colorscheme_dir = "~/.config/nvim/colors",
include_builtin_themes = false,
reroll_keymap = "<leader>tr",
})
EOF
π¦ lazy.nvim
example config:
{
"Styzex/RandTheme.nvim",
event = "VimEnter",
-- Your configuration options here (all optional)
lazy = false,
priority = 1000,
config = function()
require("randtheme").setup({
exclude_themes = {},
change_on_startup = true,
print_theme_name = true,
change_interval = 1,
colorscheme_dir = "~/.config/nvim/colors",
include_builtin_themes = false,
reroll_keymap = "<leader>tr",
})
end,
},
You can also use the opts
option to pass in the configuration options:
{
"Styzex/RandTheme.nvim",
event = "VimEnter",
-- Your configuration options here (all optional)
lazy = false,
priority = 1000,
opts = {
exclude_themes = {},
change_on_startup = true,
print_theme_name = false,
change_interval = 1,
colorscheme_dir = "~/.config/nvim/colors",
include_builtin_themes = false,
reroll_keymap = "<leader>tr",
}
},
π€Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π Code Style
- Use clear and descriptive variable and function names.
π Reporting Issues
If you find a bug or have a suggestion for improvement:
- Check if the issue already exists in the issue tracker.
- If not, create a new issue, providing as much detail as possible, including:
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Neovim version
- Operating system
π€ Questions?
If you have questions, feel free to:
- Open an issue with your question
We appreciate your interest in making RandTheme better for everyone!