Skip to content

Commit

Permalink
fix(lsp): use distinct styles for (non-)underline diags
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineco committed Jun 2, 2024
1 parent 35f15c4 commit 8ca1c0c
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions colors/gruvbox-material.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
let s:configuration = gruvbox_material#get_configuration()
let s:palette = gruvbox_material#get_palette(s:configuration.background, s:configuration.foreground, s:configuration.colors_override)
let s:path = expand('<sfile>:p') " the path of this script
let s:last_modified = 'Sat Jun 1 03:11:50 AM UTC 2024'
let s:last_modified = 'Sun Jun 2 08:41:16 UTC 2024'
let g:gruvbox_material_loaded_file_types = []

if !(exists('g:colors_name') && g:colors_name ==# 'gruvbox-material' && s:configuration.better_performance)
Expand Down Expand Up @@ -279,22 +279,33 @@ call gruvbox_material#highlight('debugBreakpoint', s:palette.bg0, s:palette.red)
call gruvbox_material#highlight('ToolbarButton', s:palette.bg0, s:palette.grey2)
if has('nvim')
call gruvbox_material#highlight('Substitute', s:palette.bg0, s:palette.yellow)
if s:configuration.diagnostic_text_highlight
call gruvbox_material#highlight('DiagnosticError', s:palette.red, s:palette.bg_red)
call gruvbox_material#highlight('DiagnosticUnderlineError', s:palette.none, s:palette.bg_red, 'undercurl', s:palette.red)
call gruvbox_material#highlight('DiagnosticWarn', s:palette.yellow, s:palette.bg_yellow)
call gruvbox_material#highlight('DiagnosticUnderlineWarn', s:palette.none, s:palette.bg_yellow, 'undercurl', s:palette.yellow)
call gruvbox_material#highlight('DiagnosticInfo', s:palette.blue, s:palette.bg_blue)
call gruvbox_material#highlight('DiagnosticUnderlineInfo', s:palette.none, s:palette.bg_blue, 'undercurl', s:palette.blue)
call gruvbox_material#highlight('DiagnosticHint', s:palette.green, s:palette.bg_green)
call gruvbox_material#highlight('DiagnosticUnderlineHint', s:palette.none, s:palette.bg_green, 'undercurl', s:palette.green)
else
call gruvbox_material#highlight('DiagnosticError', s:palette.red, s:palette.none)
call gruvbox_material#highlight('DiagnosticUnderlineError', s:palette.none, s:palette.none, 'undercurl', s:palette.red)
call gruvbox_material#highlight('DiagnosticWarn', s:palette.yellow, s:palette.none)
call gruvbox_material#highlight('DiagnosticUnderlineWarn', s:palette.none, s:palette.none, 'undercurl', s:palette.yellow)
call gruvbox_material#highlight('DiagnosticInfo', s:palette.blue, s:palette.none)
call gruvbox_material#highlight('DiagnosticUnderlineInfo', s:palette.none, s:palette.none, 'undercurl', s:palette.blue)
call gruvbox_material#highlight('DiagnosticHint', s:palette.green, s:palette.none)
call gruvbox_material#highlight('DiagnosticUnderlineHint', s:palette.none, s:palette.none, 'undercurl', s:palette.green)
endif
highlight! link DiagnosticFloatingError ErrorFloat
highlight! link DiagnosticFloatingWarn WarningFloat
highlight! link DiagnosticFloatingInfo InfoFloat
highlight! link DiagnosticFloatingHint HintFloat
highlight! link DiagnosticError ErrorText
highlight! link DiagnosticWarn WarningText
highlight! link DiagnosticInfo InfoText
highlight! link DiagnosticHint HintText
highlight! link DiagnosticVirtualTextError VirtualTextError
highlight! link DiagnosticVirtualTextWarn VirtualTextWarning
highlight! link DiagnosticVirtualTextInfo VirtualTextInfo
highlight! link DiagnosticVirtualTextHint VirtualTextHint
highlight! link DiagnosticUnderlineError ErrorText
highlight! link DiagnosticUnderlineWarn WarningText
highlight! link DiagnosticUnderlineInfo InfoText
highlight! link DiagnosticUnderlineHint HintText
highlight! link DiagnosticSignError RedSign
highlight! link DiagnosticSignWarn YellowSign
highlight! link DiagnosticSignInfo BlueSign
Expand Down

0 comments on commit 8ca1c0c

Please sign in to comment.