From 0f458a04688d71d194fc104351f8cda5aff936af Mon Sep 17 00:00:00 2001 From: Christian Chiarulli Date: Mon, 30 Aug 2021 00:59:23 -0400 Subject: onedarker colorscheme --- lua/onedarker/util.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua/onedarker/util.lua (limited to 'lua/onedarker/util.lua') diff --git a/lua/onedarker/util.lua b/lua/onedarker/util.lua new file mode 100644 index 00000000..dbac18a2 --- /dev/null +++ b/lua/onedarker/util.lua @@ -0,0 +1,25 @@ +local M = {} + +local function highlight(group, properties) + local bg = properties.bg == nil and "" or "guibg=" .. properties.bg + local fg = properties.fg == nil and "" or "guifg=" .. properties.fg + local style = properties.style == nil and "" or "gui=" .. properties.style + + local cmd = table.concat({ + "highlight", + group, + bg, + fg, + style, + }, " ") + + vim.api.nvim_command(cmd) +end + +function M.initialise(skeleton) + for group, properties in pairs(skeleton) do + highlight(group, properties) + end +end + +return M -- cgit v1.2.3