feat\!: replace disableItalics with italics config option
Replace the negative boolean `disableItalics` with positive `italics` option for better API ergonomics. This affects all italic styling throughout the theme including comments, keywords, and plugin highlights. BREAKING CHANGE: Users must update their configuration from `disableItalics = true` to `italics = false`.
This commit is contained in:
@@ -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 = not config.disableItalics },
|
||||
["@variable.builtin"] = { fg = theme.syn.special2, italic = config.italics },
|
||||
-- @variable.parameter parameters of a function
|
||||
["@variable.parameter"] = { fg = theme.syn.parameter },
|
||||
-- @variable.parameter.builtin special parameters (e.g. `_`, `it`)
|
||||
@@ -80,7 +80,7 @@ function M.setup(colors, config)
|
||||
["@keyword.return"] = vim.tbl_extend(
|
||||
"force",
|
||||
{ fg = theme.syn.special3 },
|
||||
config.disableItalics and {} or config.keywordStyle
|
||||
not config.italics and {} or config.keywordStyle
|
||||
),
|
||||
-- @keyword.debug keywords related to debugging
|
||||
-- @keyword.exception keywords related to exceptions (e.g. `throw`, `catch`)
|
||||
|
||||
Reference in New Issue
Block a user