mirror of
https://github.com/gabehf/base46.git
synced 2026-03-09 23:48:16 -07:00
re-write whole plugin
added features to have local nvchad themes, override specific colors aka variables in nvchad themes
This commit is contained in:
parent
dbd746da1b
commit
1db5a6eda8
76 changed files with 1592 additions and 1284 deletions
21
lua/chadlights.lua
Normal file
21
lua/chadlights.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue