From 673e684ffbad7ba482209e54dadf865ce71ef74c Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Thu, 2 Dec 2021 18:51:03 +0800 Subject: [PATCH] reuse util in randombones --- colors/randombones.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/colors/randombones.lua b/colors/randombones.lua index 2c0a916..a419c02 100644 --- a/colors/randombones.lua +++ b/colors/randombones.lua @@ -4,7 +4,8 @@ end vim.g.colors_name = "randombones" -local colorschemes = vim.fn.json_decode(vim.fn.readfile(vim.fn.expand ":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()