auto generate docs
This commit is contained in:
134
doc/zenbones.txt
134
doc/zenbones.txt
@@ -22,15 +22,6 @@ Just apply the colorscheme as usual:
|
|||||||
>
|
>
|
||||||
colorscheme zenbones " light
|
colorscheme zenbones " light
|
||||||
colorscheme zenflesh " dark
|
colorscheme zenflesh " dark
|
||||||
<
|
|
||||||
|
|
||||||
|
|
||||||
If you want to make use of the lua version:
|
|
||||||
|
|
||||||
>
|
|
||||||
" Requires `neovim` and `rktjmp/lush.nvim` installed
|
|
||||||
colorscheme zenbones-lush
|
|
||||||
colorscheme zenflesh-lush
|
|
||||||
|
|
||||||
" https://neovim.io flavor
|
" https://neovim.io flavor
|
||||||
colorscheme neobones
|
colorscheme neobones
|
||||||
@@ -44,7 +35,7 @@ or customizing the colors to your likings.
|
|||||||
|
|
||||||
CONFIGURATION *zenbones-configuration*
|
CONFIGURATION *zenbones-configuration*
|
||||||
|
|
||||||
Configuration is only available for `zenbones-lush` and `zenflesh-lush`.
|
Configuration is only available for neovim.
|
||||||
|
|
||||||
*zenbones-g:zenbones_lightness*
|
*zenbones-g:zenbones_lightness*
|
||||||
|
|
||||||
@@ -117,6 +108,37 @@ colors in lua:
|
|||||||
<
|
<
|
||||||
|
|
||||||
|
|
||||||
|
Here’s an example of how to extend/override some highlights:
|
||||||
|
|
||||||
|
>
|
||||||
|
local function customize_zenbones()
|
||||||
|
if vim.g.colors_name ~= "zenbones" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local lush = require "lush"
|
||||||
|
local base = require "zenbones"
|
||||||
|
|
||||||
|
local specs = lush.parse(function()
|
||||||
|
return {
|
||||||
|
TabLine { base.TabLine, gui = "italic" }, -- setting gui to "italic"
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
|
lush.apply(lush.compile(specs))
|
||||||
|
end
|
||||||
|
|
||||||
|
return customize_zenbones
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
|
And then somewhere in your config:
|
||||||
|
|
||||||
|
>
|
||||||
|
autocmd VimEnter,ColorScheme * lua require("customize_zenbones")()
|
||||||
|
<
|
||||||
|
|
||||||
|
|
||||||
See also Lush’s documentation
|
See also Lush’s documentation
|
||||||
<https://github.com/rktjmp/lush.nvim#advanced-usage> for more options.
|
<https://github.com/rktjmp/lush.nvim#advanced-usage> for more options.
|
||||||
|
|
||||||
@@ -133,77 +155,65 @@ contains the following:
|
|||||||
>
|
>
|
||||||
vim.g.colors_name = "gruvbones"
|
vim.g.colors_name = "gruvbones"
|
||||||
|
|
||||||
-- let's base bg=dark, bg=light on zenflesh, zenbones specs respectively
|
|
||||||
local base_name = vim.opt.background:get() == "dark" and "zenflesh" or "zenbones"
|
|
||||||
|
|
||||||
-- reset base palette and specs
|
|
||||||
package.loaded[base_name .. ".palette"] = nil
|
|
||||||
package.loaded[base_name] = nil
|
|
||||||
|
|
||||||
local lush = require "lush"
|
local lush = require "lush"
|
||||||
local hsl = lush.hsl
|
local hsluv = lush.hsluv -- human-friendly hsl
|
||||||
|
local util = require "zenbones.util"
|
||||||
|
|
||||||
-- modify base palette (before requiring specs)
|
-- let's base bg=dark, bg=light on zenflesh, zenbones specs respectively
|
||||||
-- and we can also define our own
|
local base_name = util.bg_to_base_name()
|
||||||
-- note: non-exhaustive copy of gruvbox palette. Ref: https://github.com/gruvbox-community/gruvbox#palette
|
|
||||||
local base = require(base_name .. ".palette")
|
-- create a palette. Use palette_extend to fill unspecified colors
|
||||||
local gruv
|
-- based on https://github.com/gruvbox-community/gruvbox#palette
|
||||||
|
local palette
|
||||||
if base_name == "zenbones" then
|
if base_name == "zenbones" then
|
||||||
base.bg = hsl "#fbf1c7"
|
palette = util.palette_extend({
|
||||||
base.fg = hsl "#3c3836"
|
bg = hsluv "#fbf1c7",
|
||||||
gruv = {
|
fg = hsluv "#3c3836",
|
||||||
gray = hsl "#7c6f64",
|
rose = hsluv "#9d0006",
|
||||||
fg0 = hsl "#282828",
|
leaf = hsluv "#79740e",
|
||||||
fg1 = hsl "#3c3836",
|
wood = hsluv "#b57614",
|
||||||
fg2 = hsl "#504945",
|
water = hsluv "#076678",
|
||||||
fg3 = hsl "#665c54",
|
blossom = hsluv "#8f3f71",
|
||||||
fg4 = hsl "#7c6f64",
|
sky = hsluv "#427b58",
|
||||||
}
|
}, "zenbones")
|
||||||
else
|
else
|
||||||
base.bg = hsl "#282828"
|
palette = util.palette_extend({
|
||||||
base.fg = hsl "#ebdbb2"
|
bg = hsluv "#282828",
|
||||||
gruv = {
|
fg = hsluv "#ebdbb2",
|
||||||
gray = hsl "#a89984",
|
rose = hsluv "#fb4934",
|
||||||
fg0 = hsl "#fbf1c7",
|
leaf = hsluv "#b8bb26",
|
||||||
fg1 = hsl "#ebdbb2",
|
wood = hsluv "#fabd2f",
|
||||||
fg2 = hsl "#d5c4a1",
|
water = hsluv "#83a598",
|
||||||
fg3 = hsl "#d5c4a1",
|
blossom = hsluv "#d3869b",
|
||||||
fg4 = hsl "#a89984",
|
sky = hsluv "#83c07c",
|
||||||
}
|
}, "zenflesh")
|
||||||
end
|
end
|
||||||
|
|
||||||
base.rose = hsl "#cc241d"
|
-- generate the lush specs using the generator util
|
||||||
base.leaf = hsl "#98971a"
|
local generator = require(base_name .. ".specs")
|
||||||
base.wood = hsl "#d79921"
|
local base_specs = generator.generate(palette, generator.get_global_config(base_name))
|
||||||
base.water = hsl "#458588"
|
|
||||||
base.blossom = hsl "#b16286"
|
|
||||||
base.sky = hsl "#689d6a"
|
|
||||||
|
|
||||||
-- extend specs using Lush
|
-- optionally extend specs using Lush
|
||||||
local theme = require(base_name)
|
local specs = lush.extends({ base_specs }).with(function()
|
||||||
local specs = lush.extends({ theme }).with(function()
|
|
||||||
return {
|
return {
|
||||||
Constant { fg = gruv.fg4, gui = "italic" },
|
Statement { base_specs.Statement, fg = palette.rose },
|
||||||
Identifier { fg = gruv.fg2, gui = "italic" },
|
Special { fg = palette.water },
|
||||||
Special { fg = gruv.fg3, gui = "bold" },
|
Type { fg = palette.sky, gui = "italic" },
|
||||||
Delimiter { fg = gruv.gray },
|
|
||||||
Comment { fg = gruv.gray, gui = "italic" },
|
|
||||||
LineNr { fg = Comment.fg },
|
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- apply terminal colors
|
|
||||||
require(base_name .. ".term").setup()
|
|
||||||
|
|
||||||
-- include our theme file and pass it to lush to apply
|
-- include our theme file and pass it to lush to apply
|
||||||
lush(specs)
|
lush(specs)
|
||||||
|
|
||||||
|
-- optionally, set term colors
|
||||||
|
require("zenbones.term").apply_colors(palette)
|
||||||
<
|
<
|
||||||
|
|
||||||
|
|
||||||
And there you have it. Just call `colorscheme gruvbones` to use your new
|
And there you have it. Just call `colorscheme gruvbones` to use your new
|
||||||
colorscheme. It respects `&background` and other configurations too.
|
colorscheme. It respects `&background` and other configurations too.
|
||||||
|
|
||||||
Also checkout the neovim <../colors/neovim.lua> and rosebones
|
Also checkout the neobones <../colors/neobones.lua> and rosebones
|
||||||
<../colors/rosebones.lua> colorscheme for a similar and complete example.
|
<../colors/rosebones.lua> colorscheme for a similar and complete example.
|
||||||
|
|
||||||
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
|
||||||
|
|||||||
Reference in New Issue
Block a user