breaking: DiagnosticUnderline does not colorize fg anymore

use `colorize_diagnostic_underline_text = true` to bring back the
previous behavior.
This commit is contained in:
Michael Chris Lopez
2021-11-14 11:50:18 +08:00
parent 16f4532d53
commit 588a59c501
3 changed files with 9 additions and 8 deletions

View File

@@ -184,10 +184,10 @@ local function generate(p, opt)
DiagnosticVirtualTextError { DiagnosticError, bg = DiagnosticError.fg.saturation(8).lightness(p1.bg.l + 4) }, DiagnosticVirtualTextError { DiagnosticError, bg = DiagnosticError.fg.saturation(8).lightness(p1.bg.l + 4) },
DiagnosticVirtualTextWarn { DiagnosticWarn, bg = DiagnosticWarn.fg.saturation(8).lightness(p1.bg.l + 4) }, DiagnosticVirtualTextWarn { DiagnosticWarn, bg = DiagnosticWarn.fg.saturation(8).lightness(p1.bg.l + 4) },
DiagnosticUnderlineError { gui = "undercurl", sp = DiagnosticError.fg }, DiagnosticUnderlineError { fg = opt.colorize_diagnostic_underline_text and DiagnosticError.fg or "NONE", gui = "undercurl", sp = DiagnosticError.fg },
DiagnosticUnderlineWarn { gui = "undercurl", sp = DiagnosticWarn.fg }, DiagnosticUnderlineWarn { fg = opt.colorize_diagnostic_underline_text and DiagnosticWarn.fg or "NONE", gui = "undercurl", sp = DiagnosticWarn.fg },
DiagnosticUnderlineInfo { gui = "undercurl", sp = DiagnosticInfo.fg }, DiagnosticUnderlineInfo { fg = opt.colorize_diagnostic_underline_text and DiagnosticInfo.fg or "NONE", gui = "undercurl", sp = DiagnosticInfo.fg },
DiagnosticUnderlineHint { gui = "undercurl", sp = DiagnosticHint.fg }, DiagnosticUnderlineHint { fg = opt.colorize_diagnostic_underline_text and DiagnosticHint.fg or "NONE", gui = "undercurl", sp = DiagnosticHint.fg },
-- These groups are for the neovim tree-sitter highlights. -- These groups are for the neovim tree-sitter highlights.
-- As of writing, tree-sitter support is a WIP, group names may change. -- As of writing, tree-sitter support is a WIP, group names may change.

View File

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

View File

@@ -184,10 +184,10 @@ local function generate(p, opt)
DiagnosticVirtualTextError { DiagnosticError, bg = DiagnosticError.fg.saturation(42).lightness(p1.bg.l - 4) }, DiagnosticVirtualTextError { DiagnosticError, bg = DiagnosticError.fg.saturation(42).lightness(p1.bg.l - 4) },
DiagnosticVirtualTextWarn { DiagnosticWarn, bg = DiagnosticWarn.fg.saturation(42).lightness(p1.bg.l - 4)}, DiagnosticVirtualTextWarn { DiagnosticWarn, bg = DiagnosticWarn.fg.saturation(42).lightness(p1.bg.l - 4)},
DiagnosticUnderlineError { gui = "undercurl", sp = DiagnosticError.fg }, DiagnosticUnderlineError { fg = opt.colorize_diagnostic_underline_text and DiagnosticError.fg or "NONE", gui = "undercurl", sp = DiagnosticError.fg },
DiagnosticUnderlineWarn { gui = "undercurl", sp = DiagnosticWarn.fg }, DiagnosticUnderlineWarn { fg = opt.colorize_diagnostic_underline_text and DiagnosticWarn.fg or "NONE", gui = "undercurl", sp = DiagnosticWarn.fg },
DiagnosticUnderlineInfo { gui = "undercurl", sp = DiagnosticInfo.fg }, DiagnosticUnderlineInfo { fg = opt.colorize_diagnostic_underline_text and DiagnosticInfo.fg or "NONE", gui = "undercurl", sp = DiagnosticInfo.fg },
DiagnosticUnderlineHint { gui = "undercurl", sp = DiagnosticHint.fg }, DiagnosticUnderlineHint { fg = opt.colorize_diagnostic_underline_text and DiagnosticHint.fg or "NONE", gui = "undercurl", sp = DiagnosticHint.fg },
-- These groups are for the neovim tree-sitter highlights. -- These groups are for the neovim tree-sitter highlights.
-- As of writing, tree-sitter support is a WIP, group names may change. -- As of writing, tree-sitter support is a WIP, group names may change.