mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-10 01:14:30 +02:00
support config color scheme
This commit is contained in:
parent
ee7e49f922
commit
b6f0601d3d
5 changed files with 181 additions and 42 deletions
|
@ -1,4 +1,9 @@
|
|||
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, custom_ui = pcall(require, "custom.ui")
|
||||
if data_exists then
|
||||
if type(custom_ui) == "table" then
|
||||
|
@ -17,6 +22,25 @@ if data_exists then
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(lst_style) do
|
||||
if v == colorscheme then
|
||||
colorscheme = "sonokai"
|
||||
break
|
||||
end
|
||||
end
|
||||
for _, v in pairs(lst_material) do
|
||||
if v == colorscheme then
|
||||
colorscheme = "material"
|
||||
break
|
||||
end
|
||||
end
|
||||
for _, v in pairs(lst_onedark) do
|
||||
if v == colorscheme then
|
||||
colorscheme = "onedark"
|
||||
break
|
||||
end
|
||||
end
|
||||
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||
if not status_ok then
|
||||
local ok, _ = pcall(vim.cmd, "colorscheme " .. "gruvbox-baby")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue