Files
neovim-config/lua/config/style.lua
T
rootiest bf1be126fa 🎨 Automatic Colorscheme
- Store/restore the colorscheme when changed
- Falls back on $KITTY_THEME and then the default catppuccin-frappe
2024-07-14 00:38:52 -04:00

22 lines
773 B
Lua

-- -----------------------------------------------------------------------------
-- ---------------------------------- Style ------------------------------------
-- -----------------------------------------------------------------------------
-- Restore Colorscheme
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.colorscheme") == 1 then
-- Load the stored colorscheme
STORED_THEME = vim.fn.readfile(vim.fn.stdpath("config") .. "/.colorscheme")[1]
else
-- Get the kitty theme
if os.getenv("KITTY_THEME") then
KITTY_THEME = os.getenv("KITTY_THEME")
end
end
-- Apply the colorscheme
vim.cmd.colorscheme(STORED_THEME or KITTY_THEME or "catppuccin-frappe")
-- Set GUI font
vim.opt.guifont = "Iosevka:#e-subpixelantialias:h12"
vim.g.have_nerd_font = true