Add LSP diagnostic backgrounds for better visibility

Introduce light tinted backgrounds for LSP diagnostics
to enhance code highlighting and improve user experience.
This commit is contained in:
Ray Elliott 2025-12-11 23:45:02 +00:00
parent 5acb2cc169
commit f2a94d10ac
3 changed files with 16 additions and 17 deletions

View File

@ -95,6 +95,12 @@ M.diag_warn = {'#ff6600', 202, 'red'} -- Fluorescent orange (warnings)
M.diag_info = {'#00ccff', 45, 'cyan'} -- Bright fluorescent cyan (info - more prominent)
M.diag_hint = {'#66e0ff', 81, 'cyan'} -- Softer fluorescent cyan (hint - less prominent)
-- LSP Diagnostic backgrounds - Light tinted versions for highlighting code
M.bg_diag_error = {'#ffe6f0', 224, 'white'} -- Very light pink (for error backgrounds)
M.bg_diag_warn = {'#fff0e6', 223, 'white'} -- Very light orange (for warning backgrounds)
M.bg_diag_info = {'#e6f9ff', 195, 'white'} -- Very light cyan (for info backgrounds)
M.bg_diag_hint = {'#f0fcff', 195, 'white'} -- Very light cyan (for hint backgrounds)
-- ============================================================================
-- Primary Accent Colors (brownish-red tones)
-- ============================================================================

View File

@ -8,30 +8,30 @@ return {
-- LSP Diagnostics
-- ============================================================================
-- Error diagnostics (fluorescent hot pink)
-- Error diagnostics (fluorescent hot pink with light pink background)
DiagnosticError = { fg = c.diag_error }, -- Hot pink #ff0066
DiagnosticUnderlineError = { sp = c.diag_error, undercurl = true },
DiagnosticUnderlineError = { bg = c.bg_diag_error }, -- Light pink background instead of undercurl
DiagnosticSignError = { fg = c.diag_error, bg = c.bg },
DiagnosticFloatingError = { fg = c.diag_error },
DiagnosticVirtualTextError = { fg = c.diag_error }, -- No background
-- Warning diagnostics (fluorescent orange)
-- Warning diagnostics (fluorescent orange with light orange background)
DiagnosticWarn = { fg = c.diag_warn }, -- Fluorescent orange #ff6600
DiagnosticUnderlineWarn = { sp = c.diag_warn, undercurl = true },
DiagnosticUnderlineWarn = { bg = c.bg_diag_warn }, -- Light orange background instead of undercurl
DiagnosticSignWarn = { fg = c.diag_warn, bg = c.bg },
DiagnosticFloatingWarn = { fg = c.diag_warn },
DiagnosticVirtualTextWarn = { fg = c.diag_warn }, -- No background
-- Info diagnostics (bright fluorescent cyan)
-- Info diagnostics (bright fluorescent cyan with light cyan background)
DiagnosticInfo = { fg = c.diag_info }, -- Bright cyan #00ccff
DiagnosticUnderlineInfo = { sp = c.diag_info, underline = true },
DiagnosticUnderlineInfo = { bg = c.bg_diag_info }, -- Light cyan background instead of underline
DiagnosticSignInfo = { fg = c.diag_info, bg = c.bg },
DiagnosticFloatingInfo = { fg = c.diag_info },
DiagnosticVirtualTextInfo = { fg = c.diag_info }, -- No background
-- Hint diagnostics (softer fluorescent cyan)
-- Hint diagnostics (softer fluorescent cyan with very light cyan background)
DiagnosticHint = { fg = c.diag_hint }, -- Soft cyan #66e0ff
DiagnosticUnderlineHint = { sp = c.diag_hint, underline = true },
DiagnosticUnderlineHint = { bg = c.bg_diag_hint }, -- Very light cyan background instead of underline
DiagnosticSignHint = { fg = c.diag_hint, bg = c.bg },
DiagnosticFloatingHint = { fg = c.diag_hint },
DiagnosticVirtualTextHint = { fg = c.diag_hint }, -- No background

View File

@ -56,15 +56,8 @@ vim.diagnostic.config({
return string.format("%s: %s", diagnostic.source or "", diagnostic.message)
end,
},
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "E",
[vim.diagnostic.severity.WARN] = "W",
[vim.diagnostic.severity.HINT] = "H",
[vim.diagnostic.severity.INFO] = "I",
},
},
underline = true, -- Underline problematic text
signs = false, -- Disable signs (redundant with background highlights and virtual text)
underline = true, -- Use background highlights on problematic text
update_in_insert = false, -- Don't update diagnostics while typing
severity_sort = true, -- Sort by severity (errors first)
float = {