From 8035ba071b3302c1affcfead48af8a1ced9a41e1 Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Sat, 1 Jan 2022 21:28:50 +0100 Subject: 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]: https://github.com/neovim/neovim/pull/15585/commits/a5bbb932f9094098bd656d3f6be3c58344576709#diff-51fab2b766d0a3b606462e95de492190df173b7296147912307cdad636cd492aR77 Co-authored-by: Arctic Ice Studio Co-authored-by: Sven Greb GH-282 --- colors/nord.vim | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/colors/nord.vim b/colors/nord.vim index bfcfb06..b6d2c25 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -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 @@ -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 -- cgit v1.2.3-70-g09d2