Skip to content

Commit

Permalink
Add support for neovim 0.6.0 diagnostic API highlight groups (nordthe…
Browse files Browse the repository at this point in the history
…me#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]>

nordthemeGH-282
  • Loading branch information
Jan Steinke authored Jan 1, 2022
1 parent df497a7 commit 8035ba0
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ if has('nvim')
let g:terminal_color_15 = s:nord6_gui
endif

"+- Neovim Diagnostics API -+
call s:hi("DiagnosticWarn", s:nord13_gui, "", s:nord13_term, "", "", "")
call s:hi("DiagnosticError" , s:nord11_gui, "", s:nord11_term, "", "", "")
call s:hi("DiagnosticInfo" , s:nord8_gui, "", s:nord8_term, "", "", "")
call s:hi("DiagnosticHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
call s:hi("DiagnosticUnderlineWarn" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
call s:hi("DiagnosticUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
call s:hi("DiagnosticUnderlineInfo" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
call s:hi("DiagnosticUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")

"+--- Gutter ---+
call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "")
if g:nord_cursor_line_number_background == 0
Expand Down Expand Up @@ -575,14 +585,16 @@ call s:hi("CocHintSign" , s:nord10_gui, "", s:nord10_term, "", "", "")
" Neovim LSP
" > neovim/nvim-lspconfig
call s:hi("LspCodeLens", s:nord3_gui_bright, "", s:nord3_term, "", "", "")
call s:hi("LspDiagnosticsDefaultWarning", s:nord13_gui, "", s:nord13_term, "", "", "")
call s:hi("LspDiagnosticsDefaultError" , s:nord11_gui, "", s:nord11_term, "", "", "")
call s:hi("LspDiagnosticsDefaultInformation" , s:nord8_gui, "", s:nord8_term, "", "", "")
call s:hi("LspDiagnosticsDefaultHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
call s:hi("LspDiagnosticsUnderlineWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineInformation" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")
if has("nvim-0.5")
call s:hi("LspDiagnosticsDefaultWarning", s:nord13_gui, "", s:nord13_term, "", "", "")
call s:hi("LspDiagnosticsDefaultError" , s:nord11_gui, "", s:nord11_term, "", "", "")
call s:hi("LspDiagnosticsDefaultInformation" , s:nord8_gui, "", s:nord8_term, "", "", "")
call s:hi("LspDiagnosticsDefaultHint" , s:nord10_gui, "", s:nord10_term, "", "", "")
call s:hi("LspDiagnosticsUnderlineWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineInformation" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")
endif

" GitGutter
" > airblade/vim-gitgutter
Expand Down

0 comments on commit 8035ba0

Please sign in to comment.