35 lines
871 B
Lua
35 lines
871 B
Lua
-- All three installed; only the active one loads. lazy.nvim loads the others
|
|
-- on :colorscheme.
|
|
local schemes = { "catppuccin", "tokyonight", "kanagawa" }
|
|
|
|
local function cycle()
|
|
local current = vim.g.colors_name or ""
|
|
local idx = 1
|
|
for i, name in ipairs(schemes) do
|
|
if current:find("^" .. name) then
|
|
idx = i
|
|
end
|
|
end
|
|
local next = schemes[idx % #schemes + 1]
|
|
vim.cmd.colorscheme(next)
|
|
vim.notify("colorscheme: " .. next)
|
|
end
|
|
|
|
return {
|
|
{
|
|
"catppuccin/nvim",
|
|
name = "catppuccin",
|
|
lazy = false,
|
|
priority = 1000,
|
|
init = function()
|
|
vim.keymap.set("n", "<leader>tc", cycle, { desc = "Cycle colorscheme" })
|
|
end,
|
|
config = function()
|
|
require("catppuccin").setup({})
|
|
vim.cmd.colorscheme("catppuccin")
|
|
end,
|
|
},
|
|
{ "folke/tokyonight.nvim", lazy = true },
|
|
{ "rebelot/kanagawa.nvim", lazy = true },
|
|
}
|