mirror of
https://github.com/gabehf/base46.git
synced 2026-03-09 15:38:15 -07:00
Merge branch 'NvChad:master' into master
This commit is contained in:
commit
0b84cd2637
5 changed files with 27 additions and 17 deletions
|
|
@ -2,16 +2,12 @@ local merge_tb = require("base46").merge_tb
|
|||
|
||||
local ui = require("core.utils").load_config().ui
|
||||
local highlights = {}
|
||||
local hl_dir = vim.fn.stdpath "data" .. "/site/pack/packer/opt/base46/lua/base46/integrations"
|
||||
|
||||
-- push hl_dir file names to table
|
||||
local hl_files = require("plenary.scandir").scan_dir(hl_dir, {})
|
||||
local hl_files = vim.fn.stdpath "data" .. "/site/pack/packer/start/base46/lua/base46/integrations"
|
||||
|
||||
for _, file in ipairs(hl_files) do
|
||||
local a = vim.fn.fnamemodify(file, ":t")
|
||||
a = vim.fn.fnamemodify(a, ":r")
|
||||
|
||||
local integration = require("base46.integrations." .. a)
|
||||
for _, file in ipairs(vim.fn.readdir(hl_files)) do
|
||||
local integration = require("base46.integrations." .. vim.fn.fnamemodify(file, ":r"))
|
||||
highlights = merge_tb(highlights, integration)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -37,11 +37,14 @@ M.clear_highlights = function(hl_group)
|
|||
end
|
||||
|
||||
M.load_all_highlights = function()
|
||||
vim.opt.bg = require("base46").get_theme_tb "type" -- dark/light
|
||||
|
||||
-- reload highlights for theme switcher
|
||||
local reload = require("plenary.reload").reload_module
|
||||
local clear_hl = require("base46").clear_highlights
|
||||
|
||||
M.clear_highlights "BufferLine"
|
||||
M.clear_highlights "TS"
|
||||
clear_hl "BufferLine"
|
||||
clear_hl "TS"
|
||||
|
||||
reload "base46.integrations"
|
||||
reload "base46.chadlights"
|
||||
|
|
@ -85,10 +88,9 @@ M.extend_default_hl = function(highlights)
|
|||
|
||||
-- transparency
|
||||
if vim.g.transparency then
|
||||
-- highlights_tb = M.merge_tb(highlights_tb,)
|
||||
for key, value in pairs(glassy) do
|
||||
if highlights[key] then
|
||||
highlights[key] = value
|
||||
highlights[key] = M.merge_tb(highlights[key], value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -97,7 +99,7 @@ M.extend_default_hl = function(highlights)
|
|||
|
||||
for key, value in pairs(overriden_hl) do
|
||||
if highlights[key] then
|
||||
highlights[key] = value
|
||||
highlights[key] = M.merge_tb(highlights[key], value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -106,8 +108,6 @@ M.load_highlight = function(group)
|
|||
if type(group) == "string" then
|
||||
group = require("base46.integrations." .. group)
|
||||
M.extend_default_hl(group)
|
||||
else
|
||||
group = group
|
||||
end
|
||||
|
||||
for hl, col in pairs(group) do
|
||||
|
|
@ -177,12 +177,10 @@ M.toggle_transparency = function()
|
|||
|
||||
if g.transparency then
|
||||
g.transparency = false
|
||||
|
||||
M.load_all_highlights()
|
||||
save_chadrc_data()
|
||||
else
|
||||
g.transparency = true
|
||||
|
||||
M.load_all_highlights()
|
||||
save_chadrc_data()
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ local colors = require("base46").get_theme_tb "base_30"
|
|||
return {
|
||||
IndentBlanklineChar = { fg = colors.line },
|
||||
IndentBlanklineSpaceChar = { fg = colors.line },
|
||||
IndentBlanklineContextChar = { fg = colors.grey },
|
||||
IndentBlanklineContextStart = { bg = colors.one_bg2 },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,11 @@ return {
|
|||
WinSeparator = { fg = colors.line },
|
||||
|
||||
-- packer
|
||||
packerPackageName = { fg = colors.red },
|
||||
PackerPackageName = { fg = colors.red },
|
||||
PackerSuccess = { fg = colors.green },
|
||||
PackeProgress = { fg = colors.blue },
|
||||
PackerOutput = { fg = colors.red },
|
||||
PackerStatus = { fg = colors.blue },
|
||||
|
||||
Normal = {
|
||||
fg = theme.base05,
|
||||
|
|
|
|||
|
|
@ -29,4 +29,14 @@ return {
|
|||
NvimTreeGitNew = {
|
||||
fg = colors.yellow,
|
||||
},
|
||||
|
||||
NvimTreeSpecialFile = {
|
||||
fg = colors.yellow,
|
||||
bold = true,
|
||||
},
|
||||
|
||||
NvimTreeRootFolder = {
|
||||
fg = colors.red,
|
||||
bold = true,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue