mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-08-09 20:35:21 +02:00
add: config global variable
This commit is contained in:
parent
77436b89c4
commit
a7726a6b33
30 changed files with 703 additions and 857 deletions
|
@ -1,22 +1,33 @@
|
|||
local colorscheme = "gruvbox-baby"
|
||||
local lst_style =
|
||||
{ "sonokai", "sonokai_atlantis", "sonokai_andromeda", "sonokai_shusia", "sonokai_maia", "sonokai_espresso" }
|
||||
local lst_material = { "material", "material_deepocean", "material_palenight", "material_lighter", "material_darker" }
|
||||
local lst_onedark =
|
||||
{ "onedark", "onedark_darker", "onedark_cool", "onedark_deep,onedark_warm", "onedark_warmer", "onedark_light" }
|
||||
local data_exists, config = pcall(require, "core.config")
|
||||
if data_exists then
|
||||
if config.colorscheme ~= nil then
|
||||
colorscheme = config.colorscheme
|
||||
else
|
||||
colorscheme = "gruvbox-baby"
|
||||
end
|
||||
local transparent_mode = config.transparent_mode
|
||||
if transparent_mode ~= nil then
|
||||
if transparent_mode == 1 then
|
||||
vim.g.gruvbox_baby_transparent_mode = 1
|
||||
vim.g.sonokai_transparent_background = 2
|
||||
end
|
||||
local colorscheme = vim.g.pcode_colorscheme
|
||||
local lst_style = {
|
||||
"sonokai",
|
||||
"sonokai_atlantis",
|
||||
"sonokai_andromeda",
|
||||
"sonokai_shusia",
|
||||
"sonokai_maia",
|
||||
"sonokai_espresso",
|
||||
}
|
||||
local lst_material = {
|
||||
"material",
|
||||
"material_deepocean",
|
||||
"material_palenight",
|
||||
"material_lighter",
|
||||
"material_darker",
|
||||
}
|
||||
local lst_onedark = {
|
||||
"onedark",
|
||||
"onedark_darker",
|
||||
"onedark_cool",
|
||||
"onedark_deep,onedark_warm",
|
||||
"onedark_warmer",
|
||||
"onedark_light",
|
||||
}
|
||||
|
||||
local transparent_mode = vim.g.pcode_transparent_mode
|
||||
if transparent_mode ~= nil then
|
||||
if transparent_mode == 1 then
|
||||
vim.g.gruvbox_baby_transparent_mode = 1
|
||||
vim.g.sonokai_transparent_background = 2
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -38,10 +49,5 @@ for _, v in pairs(lst_onedark) do
|
|||
break
|
||||
end
|
||||
end
|
||||
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||
if not status_ok then
|
||||
local ok, _ = pcall(vim.cmd, "colorscheme " .. "gruvbox-baby")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
vim.cmd("colorscheme " .. colorscheme)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue