fix weird theme colors on light terminal bg | https://github.com/NvChad/NvChad/issues/1046

thanks to @tamton-aquib as he informed me about the :h bg option!
This commit is contained in:
siduck 2022-05-22 14:19:27 +05:30
parent 5980ef7803
commit 18668b59cb
30 changed files with 70 additions and 4 deletions

View file

@ -1,9 +1,6 @@
local M = {}
M.get_colors = function(type)
local name = vim.g.nvchad_theme
-- theme paths
M.get_theme_tb = function(name, type)
local default_path = "hl_themes." .. name
local user_path = "custom.themes." .. name
@ -19,11 +16,20 @@ M.get_colors = function(type)
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)
return vim.tbl_deep_extend("force", table1, table2)
end
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)
local highlights_raw = vim.split(vim.api.nvim_exec("filter BufferLine hi", true), "\n")
local highlight_groups = {}