|
|
|
@ -1,9 +1,6 @@
|
|
|
|
local M = {}
|
|
|
|
local M = {}
|
|
|
|
|
|
|
|
|
|
|
|
M.get_colors = function(type)
|
|
|
|
M.get_theme_tb = function(name, type)
|
|
|
|
local name = vim.g.nvchad_theme
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- theme paths
|
|
|
|
|
|
|
|
local default_path = "hl_themes." .. name
|
|
|
|
local default_path = "hl_themes." .. name
|
|
|
|
local user_path = "custom.themes." .. name
|
|
|
|
local user_path = "custom.themes." .. name
|
|
|
|
|
|
|
|
|
|
|
|
@ -19,11 +16,20 @@ M.get_colors = function(type)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
M.get_colors = function(type)
|
|
|
|
|
|
|
|
local name = vim.g.nvchad_theme
|
|
|
|
|
|
|
|
return M.get_theme_tb(name, type)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
M.merge_tb = function(table1, table2)
|
|
|
|
M.merge_tb = function(table1, table2)
|
|
|
|
return vim.tbl_deep_extend("force", table1, table2)
|
|
|
|
return vim.tbl_deep_extend("force", table1, table2)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
M.load_theme = function()
|
|
|
|
M.load_theme = function()
|
|
|
|
|
|
|
|
-- set bg option
|
|
|
|
|
|
|
|
local theme_type = M.get_theme_tb(vim.g.nvchad_theme, "type") -- dark/light
|
|
|
|
|
|
|
|
vim.opt.bg = theme_type
|
|
|
|
|
|
|
|
|
|
|
|
-- clear highlights of bufferline (cuz of dynamic devicons hl group on the buffer)
|
|
|
|
-- clear highlights of bufferline (cuz of dynamic devicons hl group on the buffer)
|
|
|
|
local highlights_raw = vim.split(vim.api.nvim_exec("filter BufferLine hi", true), "\n")
|
|
|
|
local highlights_raw = vim.split(vim.api.nvim_exec("filter BufferLine hi", true), "\n")
|
|
|
|
local highlight_groups = {}
|
|
|
|
local highlight_groups = {}
|
|
|
|
|