From bd39d4144a5d78acbff86aaa2bec4e35f64dee94 Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Mon, 4 Oct 2021 17:05:17 +0800 Subject: [PATCH] adjust comment handling --- lua/zenbones/init.lua | 4 ++-- lua/zenflesh/init.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/zenbones/init.lua b/lua/zenbones/init.lua index e71a641..199fd55 100644 --- a/lua/zenbones/init.lua +++ b/lua/zenbones/init.lua @@ -16,7 +16,7 @@ elseif lightness ~= nil then vim.api.nvim_echo({ { error_msg, "WarningMsg" } }, true, {}) end -local italic_comments = type(vim.g.zenbones_italic_comments) == "boolean" and vim.g.zenbones_italic_comments or true +local italic_comments = vim.g.zenbones_italic_comments ~= false and "italic" or nil -- stylua: ignore start local theme = lush(function() @@ -43,7 +43,7 @@ local theme = lush(function() ErrorMsg { Error }, -- error messages on the command line WarningMsg { fg = p.wood }, -- warning messages - Comment { fg = p.bg.da(38).de(28), gui = (italic_comments and "italic" or "NONE") }, -- any comment + Comment { fg = p.bg.da(38).de(28), gui = italic_comments }, -- 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 diff --git a/lua/zenflesh/init.lua b/lua/zenflesh/init.lua index f3bb476..8482eac 100644 --- a/lua/zenflesh/init.lua +++ b/lua/zenflesh/init.lua @@ -16,7 +16,7 @@ elseif darkness ~= nil then vim.api.nvim_echo({ { error_msg, "WarningMsg" } }, true, {}) end -local italic_comments = type(vim.g.zenflesh_italic_comments) == "boolean" and vim.g.zenflesh_italic_comments or true +local italic_comments = vim.g.zenflesh_italic_comments ~= false and "italic" or nil -- stylua: ignore start local theme = lush(function() @@ -43,7 +43,7 @@ local theme = lush(function() ErrorMsg { Error }, -- error messages on the command line WarningMsg { fg = p.wood }, -- warning messages - Comment { fg = p.bg.li(38).de(24), gui = (italic_comments and "italic" or "NONE") }, -- any comment + Comment { fg = p.bg.li(38).de(24), gui = italic_comments }, -- 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