mirror of
https://github.com/gabehf/base46.git
synced 2026-03-09 23:48:16 -07:00
added features to have local nvchad themes, override specific colors aka variables in nvchad themes
21 lines
688 B
Lua
21 lines
688 B
Lua
local merge_tb = require("base16").merge_tb
|
|
|
|
local highlights = {}
|
|
local hl_dir = vim.fn.stdpath "data" .. "/site/pack/packer/opt/nvim-base16.lua/lua/integrations"
|
|
|
|
-- push all file names in hl_dir to a table
|
|
local hl_files = require("plenary.scandir").scan_dir(hl_dir, {})
|
|
|
|
for _, file in ipairs(hl_files) do
|
|
local a = vim.fn.fnamemodify(file, ":t")
|
|
a = vim.fn.fnamemodify(a, ":r")
|
|
|
|
local integration = require("integrations." .. a)
|
|
highlights = merge_tb(highlights, integration)
|
|
end
|
|
|
|
-- override user highlights if there are any
|
|
local user_highlights = require("core.utils").load_config().ui.hl_override
|
|
highlights = merge_tb(highlights, user_highlights)
|
|
|
|
return highlights
|