prioritize nvchad_theme global when getting theme name

This commit is contained in:
siduck 2022-05-03 12:03:08 +05:30
parent a07bc6cd31
commit f4500d63ea
2 changed files with 10 additions and 2 deletions

View file

@ -1,8 +1,14 @@
local M = {}
M.get_colors = function(type)
local name = require("core.utils").load_config().ui.theme
vim.g.nvchad_theme = name
local name
if vim.g.nvchad_theme then
name = vim.g.nvchad_theme
else
name = require("core.utils").load_config().ui.theme
vim.g.nvchad_theme = name
end
-- theme paths
local default_path = "hl_themes." .. name

View file

@ -1,3 +1,5 @@
-- returns a huge table of all highlight groups & their colors
local merge_tb = require("base16").merge_tb
local highlights = {}