option to disable italic comments

This commit is contained in:
Michael Chris Lopez
2021-09-14 14:29:42 +08:00
parent d60fc8aeef
commit 549adf129f
3 changed files with 10 additions and 2 deletions

View File

@@ -85,6 +85,10 @@ highlight.
Set to `v:true` to make non-current window background dimmer than _Normal_. Set to `v:true` to make non-current window background dimmer than _Normal_.
#### g:zenbones_italic_comments
Set to `v:false` to make comments not italicize.
## Advanced Usage ## Advanced Usage
Zenbones is pretty extensible thanks to Lush. You can easily retrieve the colors Zenbones is pretty extensible thanks to Lush. You can easily retrieve the colors

View File

@@ -16,6 +16,8 @@ elseif lightness ~= nil then
vim.api.nvim_echo({ { error_msg, "WarningMsg" } }, true, {}) vim.api.nvim_echo({ { error_msg, "WarningMsg" } }, true, {})
end end
local italic_comments = type(vim.g.zenbones_italic_comments) == "boolean" and vim.g.zenbones_italic_comments or true
-- stylua: ignore start -- stylua: ignore start
local theme = lush(function() local theme = lush(function()
return { return {
@@ -41,7 +43,7 @@ local theme = lush(function()
ErrorMsg { Error }, -- error messages on the command line ErrorMsg { Error }, -- error messages on the command line
WarningMsg { fg = c.wood }, -- warning messages WarningMsg { fg = c.wood }, -- warning messages
Comment { fg = c.sand.da(38).de(28), gui = "italic" }, -- any comment Comment { fg = c.sand.da(38).de(28), gui = (italic_comments and "italic" or "NONE") }, -- any comment
Conceal { fg = c.stone.li(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel') Conceal { fg = c.stone.li(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
Cursor { bg = c.stone, fg = c.sand.li(20) }, -- character under the cursor Cursor { bg = c.stone, fg = c.sand.li(20) }, -- character under the cursor

View File

@@ -16,6 +16,8 @@ elseif darkness ~= nil then
vim.api.nvim_echo({ { error_msg, "WarningMsg" } }, true, {}) vim.api.nvim_echo({ { error_msg, "WarningMsg" } }, true, {})
end end
local italic_comments = type(vim.g.zenflesh_italic_comments) == "boolean" and vim.g.zenflesh_italic_comments or true
-- stylua: ignore start -- stylua: ignore start
local theme = lush(function() local theme = lush(function()
return { return {
@@ -41,7 +43,7 @@ local theme = lush(function()
ErrorMsg { Error }, -- error messages on the command line ErrorMsg { Error }, -- error messages on the command line
WarningMsg { fg = c.wood }, -- warning messages WarningMsg { fg = c.wood }, -- warning messages
Comment { fg = c.sand.li(32).de(48), gui = "italic" }, -- any comment Comment { fg = c.sand.li(32).de(48), gui = (italic_comments and "italic" or "NONE") }, -- any comment
Conceal { fg = c.stone.da(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel') Conceal { fg = c.stone.da(20), gui = "bold,italic" }, -- placeholder characters substituted for concealed text (see 'conceallevel')
Cursor { bg = c.stone.li(20), fg = c.sand.da(20) }, -- character under the cursor Cursor { bg = c.stone.li(20), fg = c.sand.da(20) }, -- character under the cursor