Files
neovim-config/lua/config/preload.lua
T
rootiest f4b43cdba3 Tweak leader config
- Set the default before even performing check
- Overset it if there's one to load
2024-07-16 14:44:17 -04:00

22 lines
843 B
Lua

-- -----------------------------------------------------------------------------
-- -------------------------------- PRE-LOAD -----------------------------------
-- -----------------------------------------------------------------------------
-- Set Default Leader Key
vim.g.mapleader = " "
-- Restore Leader Key
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.leader") == 1 then
-- Load Stored Leader Key
vim.g.mapleader = vim.fn.readfile(vim.fn.stdpath("config") .. "/.leader")[1]
end
-- Restore Colorscheme to variable
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