Skip to content

Commit d15dc1c

Browse files
committed
colors: support neovim diagnostics & gitsigns.nvim
Basically the same as drewtempelmeyer#33, but compatible with recent neovim versions (starting at 0.6.0) where the highlight groups were renamed from `LspDiagnosticsDefaultX` to `DiagnosticX`[1]. Co-authored-by: pr0t0typ3-ZeR0 <[email protected]> [1] neovim/neovim@a5bbb93
1 parent 847fcf5 commit d15dc1c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

colors/palenight.vim

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,27 @@ if has("nvim")
556556
let g:terminal_color_15 = s:comment_grey.gui
557557
let g:terminal_color_background = g:terminal_color_0
558558
let g:terminal_color_foreground = g:terminal_color_7
559+
" }}}
560+
" Neovim LSP colors {{{
561+
" https://github.com/neovim/neovim/blob/63b3408551561127f7845470eb51404bcd6f547b/runtime/doc/diagnostic.txt#L187
562+
call s:h("DiagnosticError", { "fg": s:red })
563+
call s:h("DiagnosticWarn", { "fg": s:yellow })
564+
call s:h("DiagnosticInfo", { "fg": s:white })
565+
call s:h("DiagnosticHint", { "fg": s:comment_grey })
566+
call s:h("DiagnosticVirtualTextError", { "fg": s:red })
567+
call s:h("DiagnosticVirtualTextWarn", { "fg": s:yellow })
568+
call s:h("DiagnosticVirtualTextInfo", { "fg": s:white })
569+
call s:h("DiagnosticVirtualTextHint", { "fg": s:comment_grey })
570+
call s:h("DiagnosticUnderlineError", { "fg": s:red, "gui": "underline", "cterm": "underline" })
571+
call s:h("DiagnosticUnderlineWarn", { "fg": s:yellow, "gui": "underline", "cterm": "underline" })
572+
call s:h("DiagnosticUnderlineInfo", { "fg": s:white, "gui": "underline", "cterm": "underline" })
573+
call s:h("DiagnosticUnderlineHint", { "fg": s:comment_grey, "gui": "underline", "cterm": "underline" })
574+
575+
" lewis6991/gitsigns.nvim
576+
call s:h("GitSignsAdd", { "fg": s:green })
577+
call s:h("GitSignsChange", { "fg": s:yellow })
578+
call s:h("GitSignsDelete", { "fg": s:red })
579+
" }}}
559580
elseif has('terminal')
560581
let g:terminal_ansi_colors = [
561582
\ s:black.gui,

0 commit comments

Comments
 (0)