refactor: make highlights setup more dynamic

This commit is contained in:
Daniel Hill 2023-03-25 22:05:39 -04:00
parent d65968c58c
commit 605c230d8a

View File

@ -1,14 +1,16 @@
local terminal_hl = require("gruber-darker.highlights.terminal")
local vim_hl = require("gruber-darker.highlights.vim")
local treesitter_hl = require("gruber-darker.highlights.treesitter")
local M = {} local M = {}
---Set highlights for configured groups local providers = {
require("gruber-darker.highlights.vim"),
require("gruber-darker.highlights.terminal"),
require("gruber-darker.highlights.treesitter"),
}
---Set highlights for configured providers
function M.setup() function M.setup()
terminal_hl.setup() for _, highlights in ipairs(providers) do
vim_hl.setup() highlights:setup()
treesitter_hl.setup() end
end end
return M return M