feat: italic_strings option

This commit is contained in:
Michael Chris Lopez
2025-06-11 08:43:54 +02:00
parent 9deaa8a38e
commit 878601c1af
4 changed files with 4 additions and 2 deletions

View File

@@ -74,6 +74,7 @@ the flavor name e.g. `g:rosebones_italic_comments`.
| darken_noncurrent_window | light | `false` | Make non-current window background darker than _Normal_. |
| lighten_noncurrent_window | dark | `false` | Make non-current window background lighter than _Normal_. |
| italic_comments | both | `true` | Make comments italicize. |
| italic_strings | both | `true` | Make strings italicize. |
| darken_comments | light | `38` | Percentage to darken comments relative to Normal bg. |
| lighten_comments | dark | `38` | Percentage to lighten comments relative to Normal bg. |
| darken_non_text | light | `25` | Percentage to darken \|hl-NonText\| relative to Normal bg. |

View File

@@ -124,7 +124,7 @@ local function generate(p, opt)
-- Uncomment and edit if you want more specific syntax highlighting.
Constant { fg = p1.fg4, gui = "italic" }, -- (preferred) any constant
String { Constant }, -- a string constant: "this is a string"
String { fg = p1.fg4, gui = opt.italic_strings ~= false and "italic" or "NONE" }, -- a string constant: "this is a string"
Character { Constant }, -- a character constant: 'c', '\n'
Number { fg = p1.fg4 }, -- a number constant: 234, 0xff
Boolean { fg = p.fg, gui = "italic" }, -- a boolean constant: TRUE, false

View File

@@ -22,6 +22,7 @@ function M.get_global_config(prefix, base_bg)
"solid_line_nr",
"colorize_diagnostic_underline_text",
"italic_comments",
"italic_strings",
"transparent_background",
})

View File

@@ -124,7 +124,7 @@ local function generate(p, opt)
-- Uncomment and edit if you want more specific syntax highlighting.
Constant { fg = p1.fg4, gui = "italic" }, -- (preferred) any constant
String { Constant }, -- a string constant: "this is a string"
String { fg = p1.fg4, gui = opt.italic_strings ~= false and "italic" or "NONE" }, -- a string constant: "this is a string"
Character { Constant }, -- a character constant: 'c', '\n'
Number { fg = p1.fg4 }, -- a number constant: 234, 0xff
Boolean { fg = p.fg, gui = "italic" }, -- a boolean constant: TRUE, false