From 588a59c5010b349d428f72d2f48379077d696d84 Mon Sep 17 00:00:00 2001 From: Michael Chris Lopez Date: Sun, 14 Nov 2021 11:50:18 +0800 Subject: [PATCH] breaking: DiagnosticUnderline does not colorize fg anymore use `colorize_diagnostic_underline_text = true` to bring back the previous behavior. --- lua/zenbones/specs/dark.lua | 8 ++++---- lua/zenbones/specs/init.lua | 1 + lua/zenbones/specs/light.lua | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lua/zenbones/specs/dark.lua b/lua/zenbones/specs/dark.lua index 8972cbb..a469169 100644 --- a/lua/zenbones/specs/dark.lua +++ b/lua/zenbones/specs/dark.lua @@ -184,10 +184,10 @@ local function generate(p, opt) DiagnosticVirtualTextError { DiagnosticError, bg = DiagnosticError.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 }, - DiagnosticUnderlineWarn { gui = "undercurl", sp = DiagnosticWarn.fg }, - DiagnosticUnderlineInfo { gui = "undercurl", sp = DiagnosticInfo.fg }, - DiagnosticUnderlineHint { gui = "undercurl", sp = DiagnosticHint.fg }, + DiagnosticUnderlineError { fg = opt.colorize_diagnostic_underline_text and DiagnosticError.fg or "NONE", gui = "undercurl", sp = DiagnosticError.fg }, + DiagnosticUnderlineWarn { fg = opt.colorize_diagnostic_underline_text and DiagnosticWarn.fg or "NONE", gui = "undercurl", sp = DiagnosticWarn.fg }, + DiagnosticUnderlineInfo { fg = opt.colorize_diagnostic_underline_text and DiagnosticInfo.fg or "NONE", gui = "undercurl", sp = DiagnosticInfo.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. -- As of writing, tree-sitter support is a WIP, group names may change. diff --git a/lua/zenbones/specs/init.lua b/lua/zenbones/specs/init.lua index b327321..3dcd5ec 100644 --- a/lua/zenbones/specs/init.lua +++ b/lua/zenbones/specs/init.lua @@ -20,6 +20,7 @@ function M.get_global_config(prefix, base_bg) "solid_vert_split", "solid_float_border", "solid_line_nr", + "colorize_diagnostic_underline_text", "italic_comments", "transparent_background", }) diff --git a/lua/zenbones/specs/light.lua b/lua/zenbones/specs/light.lua index 3b3bbbf..895e30a 100644 --- a/lua/zenbones/specs/light.lua +++ b/lua/zenbones/specs/light.lua @@ -184,10 +184,10 @@ local function generate(p, opt) DiagnosticVirtualTextError { DiagnosticError, bg = DiagnosticError.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 }, - DiagnosticUnderlineWarn { gui = "undercurl", sp = DiagnosticWarn.fg }, - DiagnosticUnderlineInfo { gui = "undercurl", sp = DiagnosticInfo.fg }, - DiagnosticUnderlineHint { gui = "undercurl", sp = DiagnosticHint.fg }, + DiagnosticUnderlineError { fg = opt.colorize_diagnostic_underline_text and DiagnosticError.fg or "NONE", gui = "undercurl", sp = DiagnosticError.fg }, + DiagnosticUnderlineWarn { fg = opt.colorize_diagnostic_underline_text and DiagnosticWarn.fg or "NONE", gui = "undercurl", sp = DiagnosticWarn.fg }, + DiagnosticUnderlineInfo { fg = opt.colorize_diagnostic_underline_text and DiagnosticInfo.fg or "NONE", gui = "undercurl", sp = DiagnosticInfo.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. -- As of writing, tree-sitter support is a WIP, group names may change.