Files
nvim/lua/plugins/colorscheme.lua
T
johannes 9b0446c5f6 feat: initial commit
- basic config according to spec
2026-11-05 15:04:29 +01:00

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 },
}