Add option to disable italic styling

This commit is contained in:
Webhooked
2025-05-07 11:49:57 +02:00
parent 921f85c99a
commit 6d7770eda6
5 changed files with 13 additions and 8 deletions
+5 -3
View File
@@ -9,7 +9,8 @@ function M.setup(colors, config)
return {
-- *Comment any comment
Comment = vim.tbl_extend("force", { fg = theme.syn.comment }, config.commentStyle),
Comment = vim.tbl_extend("force", { fg = theme.syn.comment }, config.disableItalics and {} or config
.commentStyle),
-- *Constant any constant
Constant = { fg = theme.syn.constant },
@@ -37,7 +38,8 @@ function M.setup(colors, config)
-- Operator "sizeof", "+", "*", etc.
Operator = { fg = theme.syn.operator },
-- Keyword any other keyword
Keyword = vim.tbl_extend("force", { fg = theme.syn.keyword }, config.keywordStyle),
Keyword = vim.tbl_extend("force", { fg = theme.syn.keyword }, config.disableItalics and {} or config
.keywordStyle),
-- Exception try, catch, throw
Exception = { fg = theme.syn.special2 },
@@ -66,7 +68,7 @@ function M.setup(colors, config)
-- *Underlined text that stands out, HTML links
Underlined = { fg = theme.syn.special1, underline = true },
Bold = { bold = true },
Italic = { italic = true },
Italic = { italic = not config.disableItalics },
-- *Ignore left blank, hidden |hl-Ignore|
Ignore = { link = "NonText" },