mirror of
https://github.com/gabehf/base46.git
synced 2026-03-13 17:30:30 -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 ui = require("core.utils").load_config().ui
|
||||||
local highlights = {}
|
local highlights = {}
|
||||||
local hl_dir = vim.fn.stdpath "data" .. "/site/pack/packer/opt/base46/lua/base46/integrations"
|
|
||||||
|
|
||||||
-- push hl_dir file names to table
|
-- 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
|
for _, file in ipairs(vim.fn.readdir(hl_files)) do
|
||||||
local a = vim.fn.fnamemodify(file, ":t")
|
local integration = require("base46.integrations." .. vim.fn.fnamemodify(file, ":r"))
|
||||||
a = vim.fn.fnamemodify(a, ":r")
|
|
||||||
|
|
||||||
local integration = require("base46.integrations." .. a)
|
|
||||||
highlights = merge_tb(highlights, integration)
|
highlights = merge_tb(highlights, integration)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,14 @@ M.clear_highlights = function(hl_group)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.load_all_highlights = function()
|
M.load_all_highlights = function()
|
||||||
|
vim.opt.bg = require("base46").get_theme_tb "type" -- dark/light
|
||||||
|
|
||||||
-- reload highlights for theme switcher
|
-- reload highlights for theme switcher
|
||||||
local reload = require("plenary.reload").reload_module
|
local reload = require("plenary.reload").reload_module
|
||||||
|
local clear_hl = require("base46").clear_highlights
|
||||||
|
|
||||||
M.clear_highlights "BufferLine"
|
clear_hl "BufferLine"
|
||||||
M.clear_highlights "TS"
|
clear_hl "TS"
|
||||||
|
|
||||||
reload "base46.integrations"
|
reload "base46.integrations"
|
||||||
reload "base46.chadlights"
|
reload "base46.chadlights"
|
||||||
|
|
@ -85,10 +88,9 @@ M.extend_default_hl = function(highlights)
|
||||||
|
|
||||||
-- transparency
|
-- transparency
|
||||||
if vim.g.transparency then
|
if vim.g.transparency then
|
||||||
-- highlights_tb = M.merge_tb(highlights_tb,)
|
|
||||||
for key, value in pairs(glassy) do
|
for key, value in pairs(glassy) do
|
||||||
if highlights[key] then
|
if highlights[key] then
|
||||||
highlights[key] = value
|
highlights[key] = M.merge_tb(highlights[key], value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -97,7 +99,7 @@ M.extend_default_hl = function(highlights)
|
||||||
|
|
||||||
for key, value in pairs(overriden_hl) do
|
for key, value in pairs(overriden_hl) do
|
||||||
if highlights[key] then
|
if highlights[key] then
|
||||||
highlights[key] = value
|
highlights[key] = M.merge_tb(highlights[key], value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -106,8 +108,6 @@ M.load_highlight = function(group)
|
||||||
if type(group) == "string" then
|
if type(group) == "string" then
|
||||||
group = require("base46.integrations." .. group)
|
group = require("base46.integrations." .. group)
|
||||||
M.extend_default_hl(group)
|
M.extend_default_hl(group)
|
||||||
else
|
|
||||||
group = group
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for hl, col in pairs(group) do
|
for hl, col in pairs(group) do
|
||||||
|
|
@ -177,12 +177,10 @@ M.toggle_transparency = function()
|
||||||
|
|
||||||
if g.transparency then
|
if g.transparency then
|
||||||
g.transparency = false
|
g.transparency = false
|
||||||
|
|
||||||
M.load_all_highlights()
|
M.load_all_highlights()
|
||||||
save_chadrc_data()
|
save_chadrc_data()
|
||||||
else
|
else
|
||||||
g.transparency = true
|
g.transparency = true
|
||||||
|
|
||||||
M.load_all_highlights()
|
M.load_all_highlights()
|
||||||
save_chadrc_data()
|
save_chadrc_data()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,6 @@ local colors = require("base46").get_theme_tb "base_30"
|
||||||
return {
|
return {
|
||||||
IndentBlanklineChar = { fg = colors.line },
|
IndentBlanklineChar = { fg = colors.line },
|
||||||
IndentBlanklineSpaceChar = { 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 },
|
WinSeparator = { fg = colors.line },
|
||||||
|
|
||||||
-- packer
|
-- 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 = {
|
Normal = {
|
||||||
fg = theme.base05,
|
fg = theme.base05,
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,14 @@ return {
|
||||||
NvimTreeGitNew = {
|
NvimTreeGitNew = {
|
||||||
fg = colors.yellow,
|
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