reuse util in randombones

This commit is contained in:
Michael Chris Lopez
2021-12-02 18:51:03 +08:00
parent 0deecb8e22
commit 673e684ffb

View File

@@ -4,7 +4,8 @@ end
vim.g.colors_name = "randombones"
local colorschemes = vim.fn.json_decode(vim.fn.readfile(vim.fn.expand "<sfile>:h:h" .. "/colorschemes.json"))
local util = require "zenbones.util"
local colorschemes = util.get_colorscheme_list()
math.randomseed(os.time())
local index = math.random(#colorschemes)
@@ -16,4 +17,4 @@ if colorscheme.background then
vim.opt.background = colorscheme.background
end
require("zenbones.util").apply_colorscheme()
util.apply_colorscheme()