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
+3 -2
View File
@@ -9,7 +9,7 @@ function M.setup(colors, config)
-- @variable various variable names
["@variable"] = { fg = theme.ui.fg },
-- @variable.builtin (Special) built-in variable names (e.g. `this`, `self`)
["@variable.builtin"] = { fg = theme.syn.special2, italic = true },
["@variable.builtin"] = { fg = theme.syn.special2, italic = not config.disableItalics },
-- @variable.parameter parameters of a function
["@variable.parameter"] = { fg = theme.syn.parameter },
-- @variable.parameter.builtin special parameters (e.g. `_`, `it`)
@@ -77,7 +77,8 @@ function M.setup(colors, config)
-- @keyword.modifier keywords defining type modifiers (e.g. `const`, `static`, `public`)
-- @keyword.repeat keywords related to loops (e.g. `for`, `while`)
-- @keyword.return keywords like `return` and `yield`
["@keyword.return"] = vim.tbl_extend("force", { fg = theme.syn.special3 }, config.keywordStyle),
["@keyword.return"] = vim.tbl_extend("force", { fg = theme.syn.special3 },
config.disableItalics and {} or config.keywordStyle),
-- @keyword.debug keywords related to debugging
-- @keyword.exception keywords related to exceptions (e.g. `throw`, `catch`)
["@keyword.exception"] = vim.tbl_extend("force", { fg = theme.syn.special3 }, config.statementStyle),