auto generate docs
This commit is contained in:
@@ -168,13 +168,12 @@ contains the following:
|
|||||||
local hsluv = lush.hsluv -- Human-friendly hsl
|
local hsluv = lush.hsluv -- Human-friendly hsl
|
||||||
local util = require "zenbones.util"
|
local util = require "zenbones.util"
|
||||||
|
|
||||||
-- Let's base bg=dark, bg=light on zenflesh, zenbones specs respectively
|
local bg = vim.opt.background:get()
|
||||||
local base_name = util.bg_to_base_name()
|
|
||||||
|
|
||||||
-- Define a palette. Use `palette_extend` to fill unspecified colors
|
-- Define a palette. Use `palette_extend` to fill unspecified colors
|
||||||
-- Based on https://github.com/gruvbox-community/gruvbox#palette
|
-- Based on https://github.com/gruvbox-community/gruvbox#palette
|
||||||
local palette
|
local palette
|
||||||
if base_name == "zenbones" then
|
if bg == "light" then
|
||||||
palette = util.palette_extend({
|
palette = util.palette_extend({
|
||||||
bg = hsluv "#fbf1c7",
|
bg = hsluv "#fbf1c7",
|
||||||
fg = hsluv "#3c3836",
|
fg = hsluv "#3c3836",
|
||||||
@@ -199,8 +198,8 @@ contains the following:
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Generate the lush specs using the generator util
|
-- Generate the lush specs using the generator util
|
||||||
local generator = require(base_name .. ".specs")
|
local generator = require "zenbones.specs"
|
||||||
local base_specs = generator.generate(palette, generator.get_global_config(base_name))
|
local base_specs = generator.generate(palette, bg, generator.get_global_config("gruvbones", bg))
|
||||||
|
|
||||||
-- Optionally extend specs using Lush
|
-- Optionally extend specs using Lush
|
||||||
local specs = lush.extends({ base_specs }).with(function()
|
local specs = lush.extends({ base_specs }).with(function()
|
||||||
|
|||||||
Reference in New Issue
Block a user