config for solid FloatBorder

This commit is contained in:
Michael Chris Lopez
2021-10-20 17:14:48 +08:00
parent b2898b692b
commit 9429f2064e
5 changed files with 17 additions and 19 deletions

View File

@@ -42,8 +42,7 @@ Change background colors darkness. Options: `'stark'`, `'warm'`.
#### g:zenflesh_solid_vert_split
Default: `v:false`. Make vertical split more distinguishable background
highlight.
Default: `v:false`. Make VertSplit more distinguishable background highlight.
#### g:zenbones_darken_linenr
@@ -53,6 +52,12 @@ Default: `v:false`. Darken LineNr background.
Default: `v:false`. Lighten LineNr background.
#### g:zenbones_solid_float_border
#### g:zenflesh_solid_float_border
Default: `v:false`. Make FloatBorder more distinguishable background highlight.
#### g:zenbones_dim_noncurrent_window
Default: `v:false`. Make non-current window background dimmer than _Normal_.

View File

@@ -17,7 +17,7 @@ if bg == "light" then
else
return lush.extends({ specs }).with(function()
return {
FloatBorder { fg = hsluv "#203f57" }, -- --border-color
FloatBorder { specs.FloatBorder, fg = hsluv "#203f57" }, -- --border-color
helpHyperTextJump { fg = hsluv "#8ec77e" }, -- --link-color
helpOption { helpHyperTextJump },
markdownUrl { helpHyperTextJump },

View File

@@ -12,10 +12,6 @@ local function generate(p, opt)
vim.notify(error_msg, vim.log.levels.WARN)
end
local lighten_comments = opt.lighten_comments or 38
local comment_gui = opt.comment_gui or "italic"
local lighten_linenr = opt.lighten_linenr
-- stylua: ignore start
local theme = lush(function()
return {
@@ -41,7 +37,7 @@ local function generate(p, opt)
ErrorMsg { Error }, -- error messages on the command line
WarningMsg { fg = p.wood }, -- warning messages
Comment { fg = p.bg.li(lighten_comments).de(24), gui = comment_gui }, -- any comment
Comment { fg = p.bg.li(opt.lighten_comments or 38).de(24), gui = opt.comment_gui or "italic" }, -- any comment
Conceal { fg = p.fg.da(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
Cursor { bg = p.fg.li(20), fg = p.bg.da(20) }, -- character under the cursor
@@ -59,7 +55,7 @@ local function generate(p, opt)
DiffDelete { bg = p.rose.saturation(30).lightness(normal_bg.l + 8) }, -- diff mode: Deleted line |diff.txt|
DiffText { bg = p.water.saturation(50).lightness(normal_bg.l + 20), fg = p.fg }, -- diff mode: Changed text within a changed line |diff.txt|
LineNr { fg = Normal.bg.li(30), bg = lighten_linenr and Normal.bg.li(6) or "NONE" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
LineNr { fg = Normal.bg.li(30), bg = opt.lighten_linenr and Normal.bg.li(6) or "NONE" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
SignColumn { LineNr }, -- column where |signs| are displayed
FoldColumn { LineNr, gui = "bold" }, -- 'foldcolumn'
Folded { bg = Normal.bg.li(16), fg = Normal.bg.li(64) }, -- line used for closed folds
@@ -70,7 +66,7 @@ local function generate(p, opt)
-- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
MoreMsg { fg = p.leaf, gui = "bold" }, -- |more-prompt|
NormalFloat { bg = Normal.bg.li(8) }, -- Normal text in floating windows.
FloatBorder { fg = Normal.bg.li(46) }, -- Normal text in floating windows.
FloatBorder { fg = Normal.bg.li(46), bg = opt.solid_float_border and NormalFloat.bg or "NONE" }, -- Normal text in floating windows.
Pmenu { bg = Normal.bg.li(12) }, -- Popup menu: normal item.
PmenuSel { bg = Normal.bg.li(24) }, -- Popup menu: selected item.
@@ -306,7 +302,7 @@ local function generate(p, opt)
TelescopeSelection { CursorLine },
TelescopeSelectionCaret { TelescopeSelection, fg = p.rose },
TelescopeMatching { fg = p.blossom, gui = "bold" },
TelescopeBorder { FloatBorder },
TelescopeBorder { fg = FloatBorder.fg },
Sneak { Search },
SneakLabel { WildMenu },

View File

@@ -3,6 +3,7 @@ local M = {}
function M.get_global_config(prefix, base_bg)
local common = {
solid_vert_split = vim.g[prefix .. "_solid_vert_split"],
solid_float_border = vim.g[prefix .. "_solid_float_border"],
comment_gui = vim.g[prefix .. "_italic_comments"] ~= false and "italic" or "NONE",
}
if base_bg == "light" then

View File

@@ -12,10 +12,6 @@ local function generate(p, opt)
vim.notify(error_msg, vim.log.levels.WARN)
end
local darken_comments = opt.darken_comments or 38
local comment_gui = opt.comment_gui or "italic"
local darken_linenr = opt.darken_linenr
-- stylua: ignore start
local theme = lush(function()
return {
@@ -41,7 +37,7 @@ local function generate(p, opt)
ErrorMsg { Error }, -- error messages on the command line
WarningMsg { fg = p.wood }, -- warning messages
Comment { fg = p.bg.da(darken_comments).de(28), gui = comment_gui }, -- any comment
Comment { fg = p.bg.da(opt.darken_comments or 38).de(28), gui = opt.comment_gui or "italic" }, -- any comment
Conceal { fg = p.fg.li(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
Cursor { bg = p.fg, fg = p.bg.li(20) }, -- character under the cursor
@@ -59,7 +55,7 @@ local function generate(p, opt)
DiffDelete { bg = p.rose.saturation(40).lightness(normal_bg.l - 6) }, -- diff mode: Deleted line |diff.txt|
DiffText { bg = p.water.saturation(30).lightness(normal_bg.l - 18), fg = p.fg }, -- diff mode: Changed text within a changed line |diff.txt|
LineNr { fg = Normal.bg.da(32), bg = darken_linenr and Normal.bg.da(4) or "NONE" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
LineNr { fg = Normal.bg.da(32), bg = opt.darken_linenr and Normal.bg.da(4) or "NONE" }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
SignColumn { LineNr }, -- column where |signs| are displayed
FoldColumn { LineNr, gui = "bold" }, -- 'foldcolumn'
Folded { bg = Normal.bg.da(16), fg = Normal.bg.da(64) }, -- line used for closed folds
@@ -70,7 +66,7 @@ local function generate(p, opt)
-- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
MoreMsg { fg = p.leaf, gui = "bold" }, -- |more-prompt|
NormalFloat { bg = Normal.bg.da(6) }, -- Normal text in floating windows.
FloatBorder { fg = Normal.bg.da(50) }, -- Normal text in floating windows.
FloatBorder { fg = Normal.bg.da(50), bg = opt.solid_float_border and NormalFloat.bg or "NONE" }, -- Normal text in floating windows.
Pmenu { bg = Normal.bg.da(10) }, -- Popup menu: normal item.
PmenuSel { bg = Normal.bg.da(20) }, -- Popup menu: selected item.
@@ -306,7 +302,7 @@ local function generate(p, opt)
TelescopeSelection { CursorLine },
TelescopeSelectionCaret { TelescopeSelection, fg = p.rose },
TelescopeMatching { fg = p.blossom, gui = "bold" },
TelescopeBorder { FloatBorder },
TelescopeBorder { fg = FloatBorder.fg },
Sneak { Search },
SneakLabel { WildMenu },