Skip to content

Commit 8035ba0

Browse files
author
Jan Steinke
authored
Add support for neovim 0.6.0 diagnostic API highlight groups (#282)
In Neovim `0.6.0` [1] the naming scheme for the highlight groups of the diagnostic API changed [2]. The new groups have been added as default while the previous groups are conditionally guarded when using Neovim `0.5.0`. [1]: https://github.com/neovim/neovim/releases/tag/v0.6.0 [2]: neovim/neovim@a5bbb93#diff-51fab2b766d0a3b606462e95de492190df173b7296147912307cdad636cd492aR77 Co-authored-by: Arctic Ice Studio <[email protected]> Co-authored-by: Sven Greb <[email protected]> GH-282
1 parent df497a7 commit 8035ba0

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

colors/nord.vim

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,16 @@ if has('nvim')
216216
let g:terminal_color_15 = s:nord6_gui
217217
endif
218218

219+
"+- Neovim Diagnostics API -+
220+
call s:hi("DiagnosticWarn", s:nord13_gui, "", s:nord13_term, "", "", "")
221+
call s:hi("DiagnosticError" , s:nord11_gui, "", s:nord11_term, "", "", "")
222+
call s:hi("DiagnosticInfo" , s:nord8_gui, "", s:nord8_term, "", "", "")
223+
call s:hi("DiagnosticHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
224+
call s:hi("DiagnosticUnderlineWarn" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
225+
call s:hi("DiagnosticUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
226+
call s:hi("DiagnosticUnderlineInfo" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
227+
call s:hi("DiagnosticUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")
228+
219229
"+--- Gutter ---+
220230
call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "")
221231
if g:nord_cursor_line_number_background == 0
@@ -575,14 +585,16 @@ call s:hi("CocHintSign" , s:nord10_gui, "", s:nord10_term, "", "", "")
575585
" Neovim LSP
576586
" > neovim/nvim-lspconfig
577587
call s:hi("LspCodeLens", s:nord3_gui_bright, "", s:nord3_term, "", "", "")
578-
call s:hi("LspDiagnosticsDefaultWarning", s:nord13_gui, "", s:nord13_term, "", "", "")
579-
call s:hi("LspDiagnosticsDefaultError" , s:nord11_gui, "", s:nord11_term, "", "", "")
580-
call s:hi("LspDiagnosticsDefaultInformation" , s:nord8_gui, "", s:nord8_term, "", "", "")
581-
call s:hi("LspDiagnosticsDefaultHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
582-
call s:hi("LspDiagnosticsUnderlineWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
583-
call s:hi("LspDiagnosticsUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
584-
call s:hi("LspDiagnosticsUnderlineInformation" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
585-
call s:hi("LspDiagnosticsUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")
588+
if has("nvim-0.5")
589+
call s:hi("LspDiagnosticsDefaultWarning", s:nord13_gui, "", s:nord13_term, "", "", "")
590+
call s:hi("LspDiagnosticsDefaultError" , s:nord11_gui, "", s:nord11_term, "", "", "")
591+
call s:hi("LspDiagnosticsDefaultInformation" , s:nord8_gui, "", s:nord8_term, "", "", "")
592+
call s:hi("LspDiagnosticsDefaultHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
593+
call s:hi("LspDiagnosticsUnderlineWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
594+
call s:hi("LspDiagnosticsUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
595+
call s:hi("LspDiagnosticsUnderlineInformation" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
596+
call s:hi("LspDiagnosticsUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")
597+
endif
586598

587599
" GitGutter
588600
" > airblade/vim-gitgutter

0 commit comments

Comments
 (0)