breaking: randombones now only support neovim
This commit is contained in:
19
colors/randombones.lua
Normal file
19
colors/randombones.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
if vim.g.colors_name then
|
||||
vim.api.nvim_command [[highlight clear]]
|
||||
end
|
||||
|
||||
vim.g.colors_name = "randombones"
|
||||
|
||||
local colorschemes = vim.fn.json_decode(vim.fn.readfile(vim.fn.expand "<sfile>:h:h" .. "/colorschemes.json"))
|
||||
|
||||
math.randomseed(os.time())
|
||||
local index = math.random(#colorschemes)
|
||||
local colorscheme = colorschemes[index]
|
||||
|
||||
vim.g.randombones_colors_name = colorscheme.name
|
||||
|
||||
if colorscheme.background then
|
||||
vim.opt.background = colorscheme.background
|
||||
end
|
||||
|
||||
require("zenbones.util").apply_colorscheme()
|
||||
Reference in New Issue
Block a user