Checks for .settings files

- Checks for missing files and creates them
- More efficient handling of those settings
This commit is contained in:
2024-07-18 14:14:08 -04:00
parent 47825ea80b
commit c1dd778e47
7 changed files with 84 additions and 52 deletions
+7 -15
View File
@@ -5,22 +5,14 @@
-- 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
-- Correct missing settings files
require("config.check-files")
-- 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
-- Load Stored Leader Key
vim.g.mapleader = vim.fn.readfile(vim.fn.stdpath("config") .. "/.leader")[1]
-- Load the stored colorscheme
STORED_THEME = vim.fn.readfile(vim.fn.stdpath("config") .. "/.colorscheme")[1]
-- ----------------------------------- LSP --------------------------------------
vim.g.loaded_perl_provider = 0