A powerful interactive theme selector & editor for Neovim.
- Switch Themes On The Fly - Instantly browse and switch themes
- Preview before applying – Hover over themes to see how they look
- Live Theme Editor – Modify highlight groups such as Normal, CursorLine, Comment, etc.
- Persistent Customization – Your custom theme tweaks are saved across sessions
- Seamless Keybindings & Commands
Using lazy.nvim:
{
'AryanRogye/theme-picker.nvim',
config = function()
end
}This plugin works with any Neovim theme. The following examples use:
Ensure these plugins are installed for the configurations to work as intended. You can install them using your favorite plugin manager, such as lazy.nvim:
-- Install GruvBox
{
'morhetz/gruvbox',
lazy = false
}-- Install Dark Flat
{
"sekke276/dark_flat.nvim",
lazy = false
},- Having a centralized location for themes - For Example:
-- File: lua/my-themes.lua
local M = {}
-- Example Themes
M.load_gruvbox = function()
-- Set GruvBox-specific configurations
vim.opt.termguicolors = true
vim.g.gruvbox_contrast_light = 'hard'
vim.cmd([[colorscheme gruvbox]])
vim.cmd([[
highlight Normal guibg=NONE ctermbg=NONE
]])
end
M.load_dark_flat = function()
-- Set dark_flat-specific configurations
vim.cmd.colorscheme "dark_flat"
end
return M {
'AryanRogye/theme-picker.nvim',
config = function()
-- This is where you load in your themes
-- In the suggestions above it shows how to set something similar
-- There is also an example if you decided not to setup a lua file to load themes
local theme = require("my-themes")
require("theme-loader").setup({
-- if this is not set no default theme will need keys or command
default = 1, -- default index if no keys set
themes = {
-- Load Theme in format name = "" func = func <- Make sure no ()
{ name = "GruvBox", func = theme.load_gruvbox },
{ name = "Dark Flat", func = theme.load_dark_flat },
-- This is if You Directly Want To Load Theme Through Here
-- { name = "GruvBox", func = function()
-- Set GruvBox-specific configurations
-- vim.opt.termguicolors = true
-- vim.g.gruvbox_contrast_light = 'hard'
-- vim.cmd([[colorscheme gruvbox]])
-- vim.cmd([[
-- highlight Normal guibg=NONE ctermbg=NONE
-- ]])
-- end },
},
-- Default Values Can Change
config = {
-- How big the bar is
ui_col_spacing = 20,
opening = "[",
closing = "]",
selection = "X"
-- Preview on j and k
preview = true,
}
})
vim.api.nvim_set_keymap("n", "<leader>lu", ":LoadThemeByIndex<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<leader>ll", ":LoadThemeByUI<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<leader>lp", ":LoadColorPicker<CR>", { noremap = true, silent = true })
-- Optional
-- vim.api.nvim_set_keymap("n", "<leader>st", ":SaveThemeState<CR>", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("n", "<leader>rt", ":LoadThemeState<CR>", { noremap = true, silent = true })
end,
},
:SaveThemeState:ResetThemeState

