use helper to apply colorscheme

This commit is contained in:
Michael Chris Lopez
2021-11-01 10:12:33 +08:00
parent e51f15f12a
commit b25eeeb9d2
4 changed files with 491 additions and 255 deletions

View File

@@ -7,6 +7,14 @@ function M.interp(s, tab)
end))
end
function M.apply_colorscheme()
local colors_name = vim.api.nvim_get_var "colors_name"
package.loaded[colors_name] = nil
require "lush"(require(colors_name), { force_clean = false })
local p = require(colors_name .. ".palette")[vim.opt.background:get()]
require("zenbones.term").apply_colors(p)
end
function M.palette_extend(p, base_bg)
local lush = require "lush"
local hsluv = lush.hsluv