config for comments contrast
This commit is contained in:
@@ -59,6 +59,16 @@ Default: `v:false`. Make non-current window background warmer than _Normal_.
|
|||||||
|
|
||||||
Default: `v:true`. Make comments italicize.
|
Default: `v:true`. Make comments italicize.
|
||||||
|
|
||||||
|
#### g:zenbones_darken_comments
|
||||||
|
|
||||||
|
Default: 38. Percentage to darken comments. Comments base their fg color on the
|
||||||
|
bg palette. See also |lush-color-darken|.
|
||||||
|
|
||||||
|
#### g:zenflesh_lighten_comments
|
||||||
|
|
||||||
|
Default: 38. Percentage to lighten comments. Comments base their fg color on the
|
||||||
|
bg palette. See also |lush-color-lighten|.
|
||||||
|
|
||||||
#### g:zenbones_compat
|
#### g:zenbones_compat
|
||||||
|
|
||||||
Set to `1` to turn on compatibility mode.
|
Set to `1` to turn on compatibility mode.
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ local function generate(p, opt)
|
|||||||
vim.notify(error_msg, vim.log.levels.WARN)
|
vim.notify(error_msg, vim.log.levels.WARN)
|
||||||
end
|
end
|
||||||
|
|
||||||
local comment_gui = opt.comment_gui
|
local lighten_comment = opt.lighten_comment or 38
|
||||||
|
local comment_gui = opt.comment_gui or "italic"
|
||||||
|
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
local theme = lush(function()
|
local theme = lush(function()
|
||||||
@@ -39,7 +40,7 @@ local function generate(p, opt)
|
|||||||
ErrorMsg { Error }, -- error messages on the command line
|
ErrorMsg { Error }, -- error messages on the command line
|
||||||
WarningMsg { fg = p.wood }, -- warning messages
|
WarningMsg { fg = p.wood }, -- warning messages
|
||||||
|
|
||||||
Comment { fg = p.bg.li(38).de(24), gui = comment_gui }, -- any comment
|
Comment { fg = p.bg.li(lighten_comment).de(24), gui = comment_gui }, -- any comment
|
||||||
Conceal { fg = p.fg.da(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
|
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
|
Cursor { bg = p.fg.li(20), fg = p.bg.da(20) }, -- character under the cursor
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.get_global_config(prefix, base_bg)
|
function M.get_global_config(prefix, base_bg)
|
||||||
|
local common = {
|
||||||
|
solid_vert_split = vim.g[prefix .. "_solid_vert_split"],
|
||||||
|
comment_gui = vim.g[prefix .. "_italic_comments"] ~= false and "italic" or "NONE",
|
||||||
|
}
|
||||||
if base_bg == "light" then
|
if base_bg == "light" then
|
||||||
return {
|
return vim.tbl_extend("keep", {
|
||||||
lightness = vim.g[prefix .. "_lightness"],
|
lightness = vim.g[prefix .. "_lightness"],
|
||||||
comment_gui = vim.g[prefix .. "_italic_comments"] ~= false and "italic" or "NONE",
|
|
||||||
dim_noncurrent_window = vim.g[prefix .. "_dim_noncurrent_window"],
|
dim_noncurrent_window = vim.g[prefix .. "_dim_noncurrent_window"],
|
||||||
solid_vert_split = vim.g[prefix .. "_solid_vert_split"],
|
darken_comment = vim.g[prefix .. "_darken_comment"],
|
||||||
}
|
}, common)
|
||||||
else
|
else
|
||||||
return {
|
return vim.tbl_extend("keep", {
|
||||||
darkness = vim.g[prefix .. "_darkness"],
|
darkness = vim.g[prefix .. "_darkness"],
|
||||||
comment_gui = vim.g[prefix .. "_italic_comments"] ~= false and "italic" or "NONE",
|
|
||||||
lighten_noncurrent_window = vim.g[prefix .. "_lighten_noncurrent_window"],
|
lighten_noncurrent_window = vim.g[prefix .. "_lighten_noncurrent_window"],
|
||||||
solid_vert_split = vim.g[prefix .. "_solid_vert_split"],
|
lighten_comment = vim.g[prefix .. "_lighten_comment"],
|
||||||
}
|
}, common)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ local function generate(p, opt)
|
|||||||
vim.notify(error_msg, vim.log.levels.WARN)
|
vim.notify(error_msg, vim.log.levels.WARN)
|
||||||
end
|
end
|
||||||
|
|
||||||
local comment_gui = opt.comment_gui
|
local darken_comment = opt.darken_comment or 38
|
||||||
|
local comment_gui = opt.comment_gui or "italic"
|
||||||
|
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
local theme = lush(function()
|
local theme = lush(function()
|
||||||
@@ -39,7 +40,7 @@ local function generate(p, opt)
|
|||||||
ErrorMsg { Error }, -- error messages on the command line
|
ErrorMsg { Error }, -- error messages on the command line
|
||||||
WarningMsg { fg = p.wood }, -- warning messages
|
WarningMsg { fg = p.wood }, -- warning messages
|
||||||
|
|
||||||
Comment { fg = p.bg.da(38).de(28), gui = comment_gui }, -- any comment
|
Comment { fg = p.bg.da(darken_comment).de(28), gui = comment_gui }, -- any comment
|
||||||
Conceal { fg = p.fg.li(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
|
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
|
Cursor { bg = p.fg, fg = p.bg.li(20) }, -- character under the cursor
|
||||||
|
|||||||
Reference in New Issue
Block a user