mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add MVP variant of nvim switcher
This commit is contained in:
56
config/nvim/lua/plugins/all-themes.lua
Normal file
56
config/nvim/lua/plugins/all-themes.lua
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
return {
|
||||||
|
-- Load all theme plugins but don't apply them
|
||||||
|
-- This ensures all colorschemes are available for hot-reloading
|
||||||
|
{
|
||||||
|
"ribru17/bamboo.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sainnhe/everforest",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rebelot/kanagawa.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tahayvr/matteblack.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"loctvl842/monokai-pro.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"shaunsingh/nord.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"rose-pine/neovim",
|
||||||
|
name = "rose-pine",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = true,
|
||||||
|
priority = 1000,
|
||||||
|
},
|
||||||
|
}
|
||||||
29
config/nvim/lua/plugins/omarchy-theme-hotreload.lua
Normal file
29
config/nvim/lua/plugins/omarchy-theme-hotreload.lua
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
name = "omarchy-theme-hotreload",
|
||||||
|
dir = vim.fn.stdpath("config"),
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
-- Listen to Lazy's reload event to apply the new colorscheme
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "LazyReload",
|
||||||
|
callback = function()
|
||||||
|
package.loaded["plugins.theme"] = nil
|
||||||
|
|
||||||
|
local ok, theme_spec = pcall(require, "plugins.theme")
|
||||||
|
if ok and theme_spec then
|
||||||
|
for _, spec in ipairs(theme_spec) do
|
||||||
|
if spec[1] == "LazyVim/LazyVim" and spec.opts and spec.opts.colorscheme then
|
||||||
|
vim.schedule(function()
|
||||||
|
require("lazy.core.loader").colorscheme(spec.opts.colorscheme)
|
||||||
|
end)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user