create builder for neovim

This commit is contained in:
Michael Chris Lopez
2021-09-21 21:13:10 +08:00
parent 922eb2de63
commit 4fa79603c3
17 changed files with 772 additions and 15 deletions

View File

@@ -0,0 +1,34 @@
-- This file is auto-generated from lua/zenbones/template/lualine.lua
local common_fg = "#46624A"
local inactive_bg = "#CCDBCE"
local inactive_fg = "#597F43"
return {
normal = {
a = { bg = "#9AB79E", fg = common_fg, gui = "bold" },
b = { bg = "#B1C8B5", fg = common_fg },
c = { bg = "#C0D3C3", fg = "#212F19" },
},
insert = {
a = { bg = "#99C6E9", fg = common_fg, gui = "bold" },
},
command = {
a = { bg = "#D2A6C8", fg = common_fg, gui = "bold" },
},
visual = {
a = { bg = "#D8E6D0", fg = common_fg, gui = "bold" },
},
replace = {
a = { bg = "#E7CBCE", fg = common_fg, gui = "bold" },
},
inactive = {
a = { bg = inactive_bg, fg = inactive_fg, gui = "bold" },
b = { bg = inactive_bg, fg = inactive_fg },
c = { bg = inactive_bg, fg = inactive_fg },
},
}

View File

@@ -0,0 +1,34 @@
-- This file is auto-generated from lua/zenbones/template/lualine.lua
local common_fg = "#46624A"
local inactive_bg = "#CCDBCE"
local inactive_fg = "#597F43"
return {
normal = {
a = { bg = "#9AB79E", fg = common_fg, gui = "bold" },
b = { bg = "#B1C8B5", fg = common_fg },
c = { bg = "#C0D3C3", fg = "#212F19" },
},
insert = {
a = { bg = "#99C6E9", fg = common_fg, gui = "bold" },
},
command = {
a = { bg = "#D2A6C8", fg = common_fg, gui = "bold" },
},
visual = {
a = { bg = "#D8E6D0", fg = common_fg, gui = "bold" },
},
replace = {
a = { bg = "#E7CBCE", fg = common_fg, gui = "bold" },
},
inactive = {
a = { bg = inactive_bg, fg = inactive_fg, gui = "bold" },
b = { bg = inactive_bg, fg = inactive_fg },
c = { bg = inactive_bg, fg = inactive_fg },
},
}

View File

@@ -1,11 +1,30 @@
local util = require "zenbones.util"
local function build()
local templates = { "vim", "kitty", "alacritty", "wezterm", "lualine", "lightline", "tmux" }
for _, t in ipairs(templates) do
util.build("zenbones", require "zenbones", require "zenbones.palette", require "zenbones.terminal")
util.build("zenflesh", require "zenflesh", require "zenflesh.palette", require "zenflesh.terminal")
end
util.build("zenbones", require "zenbones", require "zenbones.palette", require "zenbones.terminal")
util.build("zenflesh", require "zenflesh", require "zenflesh.palette", require "zenflesh.terminal")
vim.opt.background = "light"
package.loaded["zenbones.palette"] = nil
package.loaded["zenbones.terminal"] = nil
package.loaded["zenbones"] = nil
util.build(
"neovim_light",
require "zenbones.neovim",
require "zenbones.neovim.palette",
require "zenbones.neovim.terminal"
)
vim.opt.background = "dark"
package.loaded["zenflesh.palette"] = nil
package.loaded["zenflesh.terminal"] = nil
package.loaded["zenflesh"] = nil
util.build(
"neovim_dark",
require "zenbones.neovim",
require "zenbones.neovim.palette",
require "zenbones.neovim.terminal"
)
end
return { build = build }

View File

@@ -1,5 +1,5 @@
local lush = require "lush"
local hsluv = lush.hsluv
local hsl = lush.hsl
-- modify base palette first (before requiring specs)
local palette = require "zenbones.neovim.palette"
@@ -11,7 +11,7 @@ local specs
if base_name == "zenbones" then
specs = lush.extends({ theme }).with(function()
return {
helpHyperTextJump { fg = hsluv "#195174" }, -- --link-color
helpHyperTextJump { fg = hsl "#195174" }, -- --link-color
helpOption { helpHyperTextJump },
markdownUrl { helpHyperTextJump },
}
@@ -19,8 +19,8 @@ if base_name == "zenbones" then
else
specs = lush.extends({ theme }).with(function()
return {
FloatBorder { fg = hsluv "#203f57" }, -- --border-color
helpHyperTextJump { fg = hsluv "#8ec77e" }, -- --link-color
FloatBorder { fg = hsl "#203f57" }, -- --border-color
helpHyperTextJump { fg = hsl "#8ec77e" }, -- --link-color
helpOption { helpHyperTextJump },
markdownUrl { helpHyperTextJump },
}

View File

@@ -1,17 +1,17 @@
local lush = require "lush"
local hsluv = lush.hsluv
local hsl = lush.hsl
local base_name = require("zenbones.util").bg_to_base_name()
local palette = require(base_name .. ".palette")
if base_name == "zenbones" then
palette.bg = hsluv "#e7eee8" -- --bg-color
palette.fg = hsluv "#202e18" -- --accent-color
palette.bg = hsl "#e7eee8" -- --bg-color
palette.fg = hsl "#202e18" -- --accent-color
palette.leaf = palette.leaf.sa(24).li(8) -- need to make green more prominent
else
palette.bg = hsluv "#0f191f" -- --bg-color
palette.fg = hsluv "#c7d6d0" -- --fg-color
palette.leaf = hsluv "#8fff6d" -- --accent-color
palette.bg = hsl "#0f191f" -- --bg-color
palette.fg = hsl "#c7d6d0" -- --fg-color
palette.leaf = hsl "#8fff6d" -- --accent-color
end
return palette