643d1bd7d8
third commit of refactor perf improvements due to async run packer sync if base16 not found this is not perfect error handling for initial run, but something handle require errors
22 lines
455 B
Lua
22 lines
455 B
Lua
-- colorscheme related stuff
|
|
vim.g.nvchad_theme = "onedark"
|
|
|
|
local base16
|
|
if
|
|
not pcall(
|
|
function()
|
|
base16 = require "base16"
|
|
end
|
|
)
|
|
then
|
|
return false
|
|
else
|
|
base16(base16.themes["onedark"], true)
|
|
local cmd = vim.cmd
|
|
|
|
-- load bg color before async for smooth transition
|
|
local background = require("themes/" .. vim.g.nvchad_theme).black
|
|
vim.cmd("hi Normal guibg=" .. background)
|
|
return true
|
|
end
|