From a49f62d3c621e243045be5e7c51685508f2bf18b Mon Sep 17 00:00:00 2001 From: ashincoder <83629316+ashincoder@users.noreply.github.com> Date: Thu, 19 Aug 2021 17:59:08 +0530 Subject: [PATCH] feat: Added option for italic_comments --- lua/chadrc.lua | 1 + lua/default_config.lua | 1 + lua/highlights.lua | 13 +++++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/chadrc.lua b/lua/chadrc.lua index 6e84c34..e9a6002 100644 --- a/lua/chadrc.lua +++ b/lua/chadrc.lua @@ -11,6 +11,7 @@ M.ui = { "onedark", "gruvchad", }, + italic_comments = false, -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal diff --git a/lua/default_config.lua b/lua/default_config.lua index 0adda31..036c4e1 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -11,6 +11,7 @@ M.ui = { "onedark", "gruvchad", }, + italic_comments = false, -- Enable this only if your terminal has the colorscheme set which nvchad uses -- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal diff --git a/lua/highlights.lua b/lua/highlights.lua index 13a3f94..99e0d03 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -41,11 +41,20 @@ fg("IndentBlanklineChar", line) -- misc -- fg("LineNr", grey) -fg("Comment", grey_fg) + +-- Comments +local ui = require("utils").load_config().ui + +if ui.italic_comments then + cmd("hi Comment gui=italic guifg=" .. grey_fg) +else + fg("Comment", grey_fg) +end + fg("NvimInternalError", red) fg("VertSplit", line) fg("EndOfBuffer", black) ---fg_bg("Visual",light_grey, colors.lightbg) +-- fg_bg("Visual",light_grey, colors.lightbg) -- Pmenu bg("Pmenu", one_bg)