From 2c61f823bc762079d233882e10fe1b320358d8dd Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Fri, 23 Jul 2021 21:43:45 +0900 Subject: [PATCH 01/11] Add basic support for neovim's built-in LSP --- colors/iceberg.vim | 10 +++++++++- src/iceberg.vim | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index 3ef4e93..e29608c 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -5,7 +5,7 @@ " " File: iceberg.vim " Maintainer: cocopon -" Modified: 2021-12-25 14:23+0900 +" Modified: 2021-12-27 20:00+0900 " License: MIT @@ -421,6 +421,14 @@ hi! link typescriptIdentifier Statement hi! link typescriptMessage icebergNormalFg hi! link typescriptNull Constant hi! link typescriptParens icebergNormalFg +hi! link LspDiagnosticsDefaultError ErrorMsg +hi! link LspDiagnosticsDefaultWarning ALEVirtualTextWarning +hi! link LspDiagnosticsDefaultInformation ALEVirtualTextWarning +hi! link LspDiagnosticsDefaultHint ALEVirtualTextWarning +hi! link LspDiagnosticsSignError ALEErrorSign +hi! link LspDiagnosticsSignWarning ALEWarningSign +hi! link LspDiagnosticsSignInformation ALEWarningSign +hi! link LspDiagnosticsSignHint ALEWarningSign if !has('nvim') hi! link SpecialKey Whitespace diff --git a/src/iceberg.vim b/src/iceberg.vim index ff9ef47..4ddac5f 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -842,6 +842,16 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('typescriptMessage', 'icebergNormalFg')) call add(links, pgmnt#hi#link('typescriptNull', 'Constant')) call add(links, pgmnt#hi#link('typescriptParens', 'icebergNormalFg')) + + " Neovim built-in LSP + call add(links, pgmnt#hi#link('LspDiagnosticsDefaultError','ErrorMsg')) + call add(links, pgmnt#hi#link('LspDiagnosticsDefaultWarning','ALEVirtualTextWarning')) + call add(links, pgmnt#hi#link('LspDiagnosticsDefaultInformation','ALEVirtualTextWarning')) + call add(links, pgmnt#hi#link('LspDiagnosticsDefaultHint','ALEVirtualTextWarning')) + call add(links, pgmnt#hi#link('LspDiagnosticsSignError','ALEErrorSign')) + call add(links, pgmnt#hi#link('LspDiagnosticsSignWarning','ALEWarningSign')) + call add(links, pgmnt#hi#link('LspDiagnosticsSignInformation','ALEWarningSign')) + call add(links, pgmnt#hi#link('LspDiagnosticsSignHint','ALEWarningSign')) " }}} return links From 202909913653bf258ee30d748042a1f9a4dd3f14 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Sun, 25 Jul 2021 20:51:41 +0900 Subject: [PATCH 02/11] Add comment --- src/iceberg.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iceberg.vim b/src/iceberg.vim index 4ddac5f..c822e4b 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -843,7 +843,7 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('typescriptNull', 'Constant')) call add(links, pgmnt#hi#link('typescriptParens', 'icebergNormalFg')) - " Neovim built-in LSP + " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultError','ErrorMsg')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultWarning','ALEVirtualTextWarning')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultInformation','ALEVirtualTextWarning')) From 67c9e80319cb61108ed0f3b11047d962a3ef6347 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Thu, 5 Aug 2021 19:30:00 +0900 Subject: [PATCH 03/11] Fix bugs reported by @vladimir-didenko https://github.com/cocopon/iceberg.vim/issues/75#issuecomment-893222988 --- colors/iceberg.vim | 12 ++++++++++-- src/iceberg.vim | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index e29608c..fb87be5 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -5,7 +5,7 @@ " " File: iceberg.vim " Maintainer: cocopon -" Modified: 2021-12-27 20:00+0900 +" Modified: 2021-12-27 20:02+0900 " License: MIT @@ -119,6 +119,10 @@ if &background == 'light' hi TSMethod ctermfg=237 guifg=#505695 hi TSURI cterm=underline ctermfg=31 gui=underline guifg=#3f83a6 term=underline hi ZenSpace ctermbg=125 guibg=#cc517a + hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline + hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline + hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline + hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guifg=#cc517a term=underline hi icebergALAccentRed ctermfg=125 guifg=#cc517a if has('nvim') @@ -240,6 +244,10 @@ else hi TSMethod ctermfg=252 guifg=#a3adcb hi TSURI cterm=underline ctermfg=109 gui=underline guifg=#89b8c2 term=underline hi ZenSpace ctermbg=203 guibg=#e27878 + hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline + hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline + hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline + hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guifg=#e27878 term=underline hi icebergALAccentRed ctermfg=203 guifg=#e27878 if has('nvim') @@ -421,7 +429,7 @@ hi! link typescriptIdentifier Statement hi! link typescriptMessage icebergNormalFg hi! link typescriptNull Constant hi! link typescriptParens icebergNormalFg -hi! link LspDiagnosticsDefaultError ErrorMsg +hi! link LspDiagnosticsDefaultError ALEVirtualTextError hi! link LspDiagnosticsDefaultWarning ALEVirtualTextWarning hi! link LspDiagnosticsDefaultInformation ALEVirtualTextWarning hi! link LspDiagnosticsDefaultHint ALEVirtualTextWarning diff --git a/src/iceberg.vim b/src/iceberg.vim index c822e4b..55309fe 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -594,6 +594,19 @@ function! s:create_colors(palette) abort \ })) " }}} + " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) + for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'orange', 'Hint': 'orange'}) + call extend(rules, pgmnt#hi#group( + \ 'LspDiagnosticsUnderline'..key, { + \ 'cterm': 'underline', + \ 'gui': 'underline', + \ 'term': 'underline', + \ 'ctermfg': eval('c.'..value), + \ 'guifg': eval('g.'.value), + \ })) + endfor + " }}} + " Palettes for statusline plugins {{{ call extend(rules, pgmnt#hi#group( \ 'icebergALAccentRed', { @@ -844,7 +857,7 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('typescriptParens', 'icebergNormalFg')) " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) - call add(links, pgmnt#hi#link('LspDiagnosticsDefaultError','ErrorMsg')) + call add(links, pgmnt#hi#link('LspDiagnosticsDefaultError','ALEVirtualTextError')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultWarning','ALEVirtualTextWarning')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultInformation','ALEVirtualTextWarning')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultHint','ALEVirtualTextWarning')) From b0a09c3a7dfa099bbd598f584b7fe606357db8e4 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Wed, 3 Nov 2021 08:51:38 +0900 Subject: [PATCH 04/11] Add 'Diagnostic*' highlighting Neovim stopped to use 'LspDiagnostics*' and unified highlighting name to 'Diagnostic*'. The link&highlights from 'Diagnostic*' is added in the same way as 'LspDiagnostics*' to fix highlighting after that change. --- colors/iceberg.vim | 16 ++++++++++++++++ src/iceberg.vim | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index fb87be5..748e762 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -123,6 +123,10 @@ if &background == 'light' hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guifg=#cc517a term=underline + hi DiagnosticUnderlineInformation cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline + hi DiagnosticUnderlineHint cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline + hi DiagnosticUnderlineWarning cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline + hi DiagnosticUnderlineError cterm=underline ctermfg=125 gui=underline guifg=#cc517a term=underline hi icebergALAccentRed ctermfg=125 guifg=#cc517a if has('nvim') @@ -248,6 +252,10 @@ else hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guifg=#e27878 term=underline + hi DiagnosticUnderlineInformation cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline + hi DiagnosticUnderlineHint cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline + hi DiagnosticUnderlineWarning cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline + hi DiagnosticUnderlineError cterm=underline ctermfg=203 gui=underline guifg=#e27878 term=underline hi icebergALAccentRed ctermfg=203 guifg=#e27878 if has('nvim') @@ -437,6 +445,14 @@ hi! link LspDiagnosticsSignError ALEErrorSign hi! link LspDiagnosticsSignWarning ALEWarningSign hi! link LspDiagnosticsSignInformation ALEWarningSign hi! link LspDiagnosticsSignHint ALEWarningSign +hi! link DiagnosticError ALEVirtualTextError +hi! link DiagnosticWarning ALEVirtualTextWarning +hi! link DiagnosticInformation ALEVirtualTextWarning +hi! link DiagnosticHint ALEVirtualTextWarning +hi! link DiagnosticSignError ALEErrorSign +hi! link DiagnosticSignWarning ALEWarningSign +hi! link DiagnosticSignInformation ALEWarningSign +hi! link DiagnosticSignHint ALEWarningSign if !has('nvim') hi! link SpecialKey Whitespace diff --git a/src/iceberg.vim b/src/iceberg.vim index 55309fe..2a9e92e 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -595,6 +595,7 @@ function! s:create_colors(palette) abort " }}} " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) + " It is deprecated in favor of 'Diagnostic*' below. for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'orange', 'Hint': 'orange'}) call extend(rules, pgmnt#hi#group( \ 'LspDiagnosticsUnderline'..key, { @@ -607,6 +608,19 @@ function! s:create_colors(palette) abort endfor " }}} + " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) + for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'orange', 'Hint': 'orange'}) + call extend(rules, pgmnt#hi#group( + \ 'DiagnosticUnderline'..key, { + \ 'cterm': 'underline', + \ 'gui': 'underline', + \ 'term': 'underline', + \ 'ctermfg': eval('c.'..value), + \ 'guifg': eval('g.'.value), + \ })) + endfor + " }}} + " Palettes for statusline plugins {{{ call extend(rules, pgmnt#hi#group( \ 'icebergALAccentRed', { @@ -857,6 +871,7 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('typescriptParens', 'icebergNormalFg')) " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) + " It is deprecated in favor of 'Diagnostic*' below. call add(links, pgmnt#hi#link('LspDiagnosticsDefaultError','ALEVirtualTextError')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultWarning','ALEVirtualTextWarning')) call add(links, pgmnt#hi#link('LspDiagnosticsDefaultInformation','ALEVirtualTextWarning')) @@ -867,6 +882,17 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('LspDiagnosticsSignHint','ALEWarningSign')) " }}} + " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) + call add(links, pgmnt#hi#link('DiagnosticError','ALEVirtualTextError')) + call add(links, pgmnt#hi#link('DiagnosticWarning','ALEVirtualTextWarning')) + call add(links, pgmnt#hi#link('DiagnosticInformation','ALEVirtualTextWarning')) + call add(links, pgmnt#hi#link('DiagnosticHint','ALEVirtualTextWarning')) + call add(links, pgmnt#hi#link('DiagnosticSignError','ALEErrorSign')) + call add(links, pgmnt#hi#link('DiagnosticSignWarning','ALEWarningSign')) + call add(links, pgmnt#hi#link('DiagnosticSignInformation','ALEWarningSign')) + call add(links, pgmnt#hi#link('DiagnosticSignHint','ALEWarningSign')) + " }}} + return links endfunction From 9d62842c5b5e1c2f7f776c64b169ee2ec6dfc384 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Wed, 3 Nov 2021 22:17:23 +0900 Subject: [PATCH 05/11] Different colors for warning/information/hint 'orange' is used for all of these previously. We stopped using `hi link` and assigned colors independently. Now 'orange' is used only for warning, 'blue' is used for information, 'linenr_fg' is used for hint. --- colors/iceberg.vim | 82 +++++++++++++++++++++++++++------------------- src/iceberg.vim | 55 ++++++++++++++++--------------- 2 files changed, 77 insertions(+), 60 deletions(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index 748e762..cb784fe 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -5,7 +5,7 @@ " " File: iceberg.vim " Maintainer: cocopon -" Modified: 2021-12-27 20:02+0900 +" Modified: 2021-12-27 20:03+0900 " License: MIT @@ -119,14 +119,30 @@ if &background == 'light' hi TSMethod ctermfg=237 guifg=#505695 hi TSURI cterm=underline ctermfg=31 gui=underline guifg=#3f83a6 term=underline hi ZenSpace ctermbg=125 guibg=#cc517a - hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline - hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline - hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline - hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guifg=#cc517a term=underline - hi DiagnosticUnderlineInformation cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline - hi DiagnosticUnderlineHint cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline - hi DiagnosticUnderlineWarning cterm=underline ctermfg=130 gui=underline guifg=#c57339 term=underline - hi DiagnosticUnderlineError cterm=underline ctermfg=125 gui=underline guifg=#cc517a term=underline + hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline + hi LspDiagnosticsDefaultInformation ctermfg=25 guifg=#2d539e + hi LspDiagnosticsSignInformation ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e + hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=248 gui=underline guisp=#9fa7bd term=underline + hi LspDiagnosticsDefaultHint ctermfg=248 guifg=#9fa7bd + hi LspDiagnosticsSignHint ctermbg=253 ctermfg=248 guibg=#dcdfe7 guifg=#9fa7bd + hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=130 gui=underline guisp=#c57339 term=underline + hi LspDiagnosticsDefaultWarning ctermfg=130 guifg=#c57339 + hi LspDiagnosticsSignWarning ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339 + hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline + hi LspDiagnosticsDefaultError ctermfg=125 guifg=#cc517a + hi LspDiagnosticsSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a + hi DiagnosticUnderlineInformation cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline + hi DiagnosticInformation ctermfg=25 guifg=#2d539e + hi DiagnosticSignInformation ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e + hi DiagnosticUnderlineHint cterm=underline ctermfg=248 gui=underline guisp=#9fa7bd term=underline + hi DiagnosticHint ctermfg=248 guifg=#9fa7bd + hi DiagnosticSignHint ctermbg=253 ctermfg=248 guibg=#dcdfe7 guifg=#9fa7bd + hi DiagnosticUnderlineWarning cterm=underline ctermfg=130 gui=underline guisp=#c57339 term=underline + hi DiagnosticWarning ctermfg=130 guifg=#c57339 + hi DiagnosticSignWarning ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339 + hi DiagnosticUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline + hi DiagnosticError ctermfg=125 guifg=#cc517a + hi DiagnosticSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a hi icebergALAccentRed ctermfg=125 guifg=#cc517a if has('nvim') @@ -248,14 +264,30 @@ else hi TSMethod ctermfg=252 guifg=#a3adcb hi TSURI cterm=underline ctermfg=109 gui=underline guifg=#89b8c2 term=underline hi ZenSpace ctermbg=203 guibg=#e27878 - hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline - hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline - hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline - hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guifg=#e27878 term=underline - hi DiagnosticUnderlineInformation cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline - hi DiagnosticUnderlineHint cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline - hi DiagnosticUnderlineWarning cterm=underline ctermfg=216 gui=underline guifg=#e2a478 term=underline - hi DiagnosticUnderlineError cterm=underline ctermfg=203 gui=underline guifg=#e27878 term=underline + hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline + hi LspDiagnosticsDefaultInformation ctermfg=110 guifg=#84a0c6 + hi LspDiagnosticsSignInformation ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 + hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=239 gui=underline guisp=#444b71 term=underline + hi LspDiagnosticsDefaultHint ctermfg=239 guifg=#444b71 + hi LspDiagnosticsSignHint ctermbg=235 ctermfg=239 guibg=#1e2132 guifg=#444b71 + hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=216 gui=underline guisp=#e2a478 term=underline + hi LspDiagnosticsDefaultWarning ctermfg=216 guifg=#e2a478 + hi LspDiagnosticsSignWarning ctermbg=235 ctermfg=216 guibg=#1e2132 guifg=#e2a478 + hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline + hi LspDiagnosticsDefaultError ctermfg=203 guifg=#e27878 + hi LspDiagnosticsSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 + hi DiagnosticUnderlineInformation cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline + hi DiagnosticInformation ctermfg=110 guifg=#84a0c6 + hi DiagnosticSignInformation ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 + hi DiagnosticUnderlineHint cterm=underline ctermfg=239 gui=underline guisp=#444b71 term=underline + hi DiagnosticHint ctermfg=239 guifg=#444b71 + hi DiagnosticSignHint ctermbg=235 ctermfg=239 guibg=#1e2132 guifg=#444b71 + hi DiagnosticUnderlineWarning cterm=underline ctermfg=216 gui=underline guisp=#e2a478 term=underline + hi DiagnosticWarning ctermfg=216 guifg=#e2a478 + hi DiagnosticSignWarning ctermbg=235 ctermfg=216 guibg=#1e2132 guifg=#e2a478 + hi DiagnosticUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline + hi DiagnosticError ctermfg=203 guifg=#e27878 + hi DiagnosticSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 hi icebergALAccentRed ctermfg=203 guifg=#e27878 if has('nvim') @@ -437,22 +469,6 @@ hi! link typescriptIdentifier Statement hi! link typescriptMessage icebergNormalFg hi! link typescriptNull Constant hi! link typescriptParens icebergNormalFg -hi! link LspDiagnosticsDefaultError ALEVirtualTextError -hi! link LspDiagnosticsDefaultWarning ALEVirtualTextWarning -hi! link LspDiagnosticsDefaultInformation ALEVirtualTextWarning -hi! link LspDiagnosticsDefaultHint ALEVirtualTextWarning -hi! link LspDiagnosticsSignError ALEErrorSign -hi! link LspDiagnosticsSignWarning ALEWarningSign -hi! link LspDiagnosticsSignInformation ALEWarningSign -hi! link LspDiagnosticsSignHint ALEWarningSign -hi! link DiagnosticError ALEVirtualTextError -hi! link DiagnosticWarning ALEVirtualTextWarning -hi! link DiagnosticInformation ALEVirtualTextWarning -hi! link DiagnosticHint ALEVirtualTextWarning -hi! link DiagnosticSignError ALEErrorSign -hi! link DiagnosticSignWarning ALEWarningSign -hi! link DiagnosticSignInformation ALEWarningSign -hi! link DiagnosticSignHint ALEWarningSign if !has('nvim') hi! link SpecialKey Whitespace diff --git a/src/iceberg.vim b/src/iceberg.vim index 2a9e92e..969dc8d 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -596,27 +596,51 @@ function! s:create_colors(palette) abort " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) " It is deprecated in favor of 'Diagnostic*' below. - for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'orange', 'Hint': 'orange'}) + for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'blue', 'Hint': 'linenr_fg'}) call extend(rules, pgmnt#hi#group( \ 'LspDiagnosticsUnderline'..key, { \ 'cterm': 'underline', \ 'gui': 'underline', \ 'term': 'underline', \ 'ctermfg': eval('c.'..value), - \ 'guifg': eval('g.'.value), + \ 'guisp': eval('g.'..value), + \ })) + call extend(rules, pgmnt#hi#group( + \ 'LspDiagnosticsDefault'..key, { + \ 'ctermfg': eval('c.'..value), + \ 'guifg': eval('g.'..value), + \ })) + call extend(rules, pgmnt#hi#group( + \ 'LspDiagnosticsSign'..key, { + \ 'ctermbg': c.linenr_bg, + \ 'ctermfg': eval('c.'..value), + \ 'guibg': g.linenr_bg, + \ 'guifg': eval('g.'..value), \ })) endfor " }}} " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) - for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'orange', 'Hint': 'orange'}) + for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'blue', 'Hint': 'linenr_fg'}) call extend(rules, pgmnt#hi#group( \ 'DiagnosticUnderline'..key, { \ 'cterm': 'underline', \ 'gui': 'underline', \ 'term': 'underline', \ 'ctermfg': eval('c.'..value), - \ 'guifg': eval('g.'.value), + \ 'guisp': eval('g.'..value), + \ })) + call extend(rules, pgmnt#hi#group( + \ 'Diagnostic'..key, { + \ 'ctermfg': eval('c.'..value), + \ 'guifg': eval('g.'..value), + \ })) + call extend(rules, pgmnt#hi#group( + \ 'DiagnosticSign'..key, { + \ 'ctermbg': c.linenr_bg, + \ 'ctermfg': eval('c.'..value), + \ 'guibg': g.linenr_bg, + \ 'guifg': eval('g.'..value), \ })) endfor " }}} @@ -870,29 +894,6 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('typescriptNull', 'Constant')) call add(links, pgmnt#hi#link('typescriptParens', 'icebergNormalFg')) - " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) - " It is deprecated in favor of 'Diagnostic*' below. - call add(links, pgmnt#hi#link('LspDiagnosticsDefaultError','ALEVirtualTextError')) - call add(links, pgmnt#hi#link('LspDiagnosticsDefaultWarning','ALEVirtualTextWarning')) - call add(links, pgmnt#hi#link('LspDiagnosticsDefaultInformation','ALEVirtualTextWarning')) - call add(links, pgmnt#hi#link('LspDiagnosticsDefaultHint','ALEVirtualTextWarning')) - call add(links, pgmnt#hi#link('LspDiagnosticsSignError','ALEErrorSign')) - call add(links, pgmnt#hi#link('LspDiagnosticsSignWarning','ALEWarningSign')) - call add(links, pgmnt#hi#link('LspDiagnosticsSignInformation','ALEWarningSign')) - call add(links, pgmnt#hi#link('LspDiagnosticsSignHint','ALEWarningSign')) - " }}} - - " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) - call add(links, pgmnt#hi#link('DiagnosticError','ALEVirtualTextError')) - call add(links, pgmnt#hi#link('DiagnosticWarning','ALEVirtualTextWarning')) - call add(links, pgmnt#hi#link('DiagnosticInformation','ALEVirtualTextWarning')) - call add(links, pgmnt#hi#link('DiagnosticHint','ALEVirtualTextWarning')) - call add(links, pgmnt#hi#link('DiagnosticSignError','ALEErrorSign')) - call add(links, pgmnt#hi#link('DiagnosticSignWarning','ALEWarningSign')) - call add(links, pgmnt#hi#link('DiagnosticSignInformation','ALEWarningSign')) - call add(links, pgmnt#hi#link('DiagnosticSignHint','ALEWarningSign')) - " }}} - return links endfunction From 1af7ef858e7690c7a3412ecd2435042b3a910d57 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Wed, 3 Nov 2021 22:30:49 +0900 Subject: [PATCH 06/11] Fix typo in Diagnostics --- colors/iceberg.vim | 24 ++++++++++++------------ src/iceberg.vim | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index cb784fe..a69802d 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -131,15 +131,15 @@ if &background == 'light' hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline hi LspDiagnosticsDefaultError ctermfg=125 guifg=#cc517a hi LspDiagnosticsSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a - hi DiagnosticUnderlineInformation cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline - hi DiagnosticInformation ctermfg=25 guifg=#2d539e - hi DiagnosticSignInformation ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e + hi DiagnosticUnderlineInfo cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline + hi DiagnosticInfo ctermfg=25 guifg=#2d539e + hi DiagnosticSignInfo ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e hi DiagnosticUnderlineHint cterm=underline ctermfg=248 gui=underline guisp=#9fa7bd term=underline hi DiagnosticHint ctermfg=248 guifg=#9fa7bd hi DiagnosticSignHint ctermbg=253 ctermfg=248 guibg=#dcdfe7 guifg=#9fa7bd - hi DiagnosticUnderlineWarning cterm=underline ctermfg=130 gui=underline guisp=#c57339 term=underline - hi DiagnosticWarning ctermfg=130 guifg=#c57339 - hi DiagnosticSignWarning ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339 + hi DiagnosticUnderlineWarn cterm=underline ctermfg=130 gui=underline guisp=#c57339 term=underline + hi DiagnosticWarn ctermfg=130 guifg=#c57339 + hi DiagnosticSignWarn ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339 hi DiagnosticUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline hi DiagnosticError ctermfg=125 guifg=#cc517a hi DiagnosticSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a @@ -276,15 +276,15 @@ else hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline hi LspDiagnosticsDefaultError ctermfg=203 guifg=#e27878 hi LspDiagnosticsSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 - hi DiagnosticUnderlineInformation cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline - hi DiagnosticInformation ctermfg=110 guifg=#84a0c6 - hi DiagnosticSignInformation ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 + hi DiagnosticUnderlineInfo cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline + hi DiagnosticInfo ctermfg=110 guifg=#84a0c6 + hi DiagnosticSignInfo ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 hi DiagnosticUnderlineHint cterm=underline ctermfg=239 gui=underline guisp=#444b71 term=underline hi DiagnosticHint ctermfg=239 guifg=#444b71 hi DiagnosticSignHint ctermbg=235 ctermfg=239 guibg=#1e2132 guifg=#444b71 - hi DiagnosticUnderlineWarning cterm=underline ctermfg=216 gui=underline guisp=#e2a478 term=underline - hi DiagnosticWarning ctermfg=216 guifg=#e2a478 - hi DiagnosticSignWarning ctermbg=235 ctermfg=216 guibg=#1e2132 guifg=#e2a478 + hi DiagnosticUnderlineWarn cterm=underline ctermfg=216 gui=underline guisp=#e2a478 term=underline + hi DiagnosticWarn ctermfg=216 guifg=#e2a478 + hi DiagnosticSignWarn ctermbg=235 ctermfg=216 guibg=#1e2132 guifg=#e2a478 hi DiagnosticUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline hi DiagnosticError ctermfg=203 guifg=#e27878 hi DiagnosticSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 diff --git a/src/iceberg.vim b/src/iceberg.vim index 969dc8d..604aa4c 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -621,7 +621,7 @@ function! s:create_colors(palette) abort " }}} " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) - for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'blue', 'Hint': 'linenr_fg'}) + for [key, value] in items({'Error': 'red', 'Warn': 'orange', 'Info': 'blue', 'Hint': 'linenr_fg'}) call extend(rules, pgmnt#hi#group( \ 'DiagnosticUnderline'..key, { \ 'cterm': 'underline', From 2f9ea671555d8eef3211539da3224483646ad25d Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Wed, 3 Nov 2021 23:19:17 +0900 Subject: [PATCH 07/11] Change hint hover color to normal text DiagnosticHint color was similar to floating window color and thus making it hard to read. Normal text will be used for the DiagnosticFloatingHint. --- colors/iceberg.vim | 2 ++ src/iceberg.vim | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index a69802d..b652e26 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -143,6 +143,7 @@ if &background == 'light' hi DiagnosticUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline hi DiagnosticError ctermfg=125 guifg=#cc517a hi DiagnosticSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a + hi DiagnosticFloatingHint ctermbg=251 ctermfg=237 guibg=#cad0de guifg=#33374c hi icebergALAccentRed ctermfg=125 guifg=#cc517a if has('nvim') @@ -288,6 +289,7 @@ else hi DiagnosticUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline hi DiagnosticError ctermfg=203 guifg=#e27878 hi DiagnosticSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 + hi DiagnosticFloatingHint ctermbg=236 ctermfg=251 guibg=#3d425b guifg=#c6c8d1 hi icebergALAccentRed ctermfg=203 guifg=#e27878 if has('nvim') diff --git a/src/iceberg.vim b/src/iceberg.vim index 604aa4c..a4e5a6e 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -643,6 +643,15 @@ function! s:create_colors(palette) abort \ 'guifg': eval('g.'..value), \ })) endfor + " Info color is hard to read within floating window, so use normal text + " color instead. + call extend(rules, pgmnt#hi#group( + \ 'DiagnosticFloatingHint', { + \ 'ctermbg': c.pmenu_bg, + \ 'ctermfg': c.pmenu_fg, + \ 'guibg': g.pmenu_bg, + \ 'guifg': g.pmenu_fg, + \ })) " }}} " Palettes for statusline plugins {{{ From d3a9b0d9252ba14abb946aef893cc5e3200a419e Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Thu, 4 Nov 2021 14:02:45 +0900 Subject: [PATCH 08/11] Fix coloring 'hint' of deprecated 'LspDiagnostics' Fix 'LspDiagnosticsFloatingHint' color to normal one. 'DiagnosticFloatingHint', has been changed to the normal color in the previous commit, so this commit has been added to fixing the coloring for older versions of Neovim. --- colors/iceberg.vim | 2 ++ src/iceberg.vim | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index b652e26..4be91a1 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -131,6 +131,7 @@ if &background == 'light' hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline hi LspDiagnosticsDefaultError ctermfg=125 guifg=#cc517a hi LspDiagnosticsSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a + hi LspDiagnosticsFloatingHint ctermbg=251 ctermfg=237 guibg=#cad0de guifg=#33374c hi DiagnosticUnderlineInfo cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline hi DiagnosticInfo ctermfg=25 guifg=#2d539e hi DiagnosticSignInfo ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e @@ -277,6 +278,7 @@ else hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline hi LspDiagnosticsDefaultError ctermfg=203 guifg=#e27878 hi LspDiagnosticsSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 + hi LspDiagnosticsFloatingHint ctermbg=236 ctermfg=251 guibg=#3d425b guifg=#c6c8d1 hi DiagnosticUnderlineInfo cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline hi DiagnosticInfo ctermfg=110 guifg=#84a0c6 hi DiagnosticSignInfo ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 diff --git a/src/iceberg.vim b/src/iceberg.vim index a4e5a6e..71e60e8 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -618,6 +618,15 @@ function! s:create_colors(palette) abort \ 'guifg': eval('g.'..value), \ })) endfor + " Info color is hard to read within floating window, so use normal text + " color instead. + call extend(rules, pgmnt#hi#group( + \ 'LspDiagnosticsFloatingHint', { + \ 'ctermbg': c.pmenu_bg, + \ 'ctermfg': c.pmenu_fg, + \ 'guibg': g.pmenu_bg, + \ 'guifg': g.pmenu_fg, + \ })) " }}} " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) From 85004d81fcad61434df453b71ed4a547e29dcbf4 Mon Sep 17 00:00:00 2001 From: woodyZootopia Date: Mon, 27 Dec 2021 19:43:06 +0900 Subject: [PATCH 09/11] Fix comments given by @cocopon --- colors/iceberg.vim | 28 +--------------------------- src/iceberg.vim | 38 ++------------------------------------ 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index 4be91a1..5d9f456 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -5,7 +5,7 @@ " " File: iceberg.vim " Maintainer: cocopon -" Modified: 2021-12-27 20:03+0900 +" Modified: 2021-12-27 20:06+0900 " License: MIT @@ -119,19 +119,6 @@ if &background == 'light' hi TSMethod ctermfg=237 guifg=#505695 hi TSURI cterm=underline ctermfg=31 gui=underline guifg=#3f83a6 term=underline hi ZenSpace ctermbg=125 guibg=#cc517a - hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline - hi LspDiagnosticsDefaultInformation ctermfg=25 guifg=#2d539e - hi LspDiagnosticsSignInformation ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e - hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=248 gui=underline guisp=#9fa7bd term=underline - hi LspDiagnosticsDefaultHint ctermfg=248 guifg=#9fa7bd - hi LspDiagnosticsSignHint ctermbg=253 ctermfg=248 guibg=#dcdfe7 guifg=#9fa7bd - hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=130 gui=underline guisp=#c57339 term=underline - hi LspDiagnosticsDefaultWarning ctermfg=130 guifg=#c57339 - hi LspDiagnosticsSignWarning ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339 - hi LspDiagnosticsUnderlineError cterm=underline ctermfg=125 gui=underline guisp=#cc517a term=underline - hi LspDiagnosticsDefaultError ctermfg=125 guifg=#cc517a - hi LspDiagnosticsSignError ctermbg=253 ctermfg=125 guibg=#dcdfe7 guifg=#cc517a - hi LspDiagnosticsFloatingHint ctermbg=251 ctermfg=237 guibg=#cad0de guifg=#33374c hi DiagnosticUnderlineInfo cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline hi DiagnosticInfo ctermfg=25 guifg=#2d539e hi DiagnosticSignInfo ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e @@ -266,19 +253,6 @@ else hi TSMethod ctermfg=252 guifg=#a3adcb hi TSURI cterm=underline ctermfg=109 gui=underline guifg=#89b8c2 term=underline hi ZenSpace ctermbg=203 guibg=#e27878 - hi LspDiagnosticsUnderlineInformation cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline - hi LspDiagnosticsDefaultInformation ctermfg=110 guifg=#84a0c6 - hi LspDiagnosticsSignInformation ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 - hi LspDiagnosticsUnderlineHint cterm=underline ctermfg=239 gui=underline guisp=#444b71 term=underline - hi LspDiagnosticsDefaultHint ctermfg=239 guifg=#444b71 - hi LspDiagnosticsSignHint ctermbg=235 ctermfg=239 guibg=#1e2132 guifg=#444b71 - hi LspDiagnosticsUnderlineWarning cterm=underline ctermfg=216 gui=underline guisp=#e2a478 term=underline - hi LspDiagnosticsDefaultWarning ctermfg=216 guifg=#e2a478 - hi LspDiagnosticsSignWarning ctermbg=235 ctermfg=216 guibg=#1e2132 guifg=#e2a478 - hi LspDiagnosticsUnderlineError cterm=underline ctermfg=203 gui=underline guisp=#e27878 term=underline - hi LspDiagnosticsDefaultError ctermfg=203 guifg=#e27878 - hi LspDiagnosticsSignError ctermbg=235 ctermfg=203 guibg=#1e2132 guifg=#e27878 - hi LspDiagnosticsFloatingHint ctermbg=236 ctermfg=251 guibg=#3d425b guifg=#c6c8d1 hi DiagnosticUnderlineInfo cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline hi DiagnosticInfo ctermfg=110 guifg=#84a0c6 hi DiagnosticSignInfo ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 diff --git a/src/iceberg.vim b/src/iceberg.vim index 71e60e8..7295593 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -594,42 +594,7 @@ function! s:create_colors(palette) abort \ })) " }}} - " [Neovim built-in LSP](https://neovim.io/doc/user/lsp.html) - " It is deprecated in favor of 'Diagnostic*' below. - for [key, value] in items({'Error': 'red', 'Warning': 'orange', 'Information': 'blue', 'Hint': 'linenr_fg'}) - call extend(rules, pgmnt#hi#group( - \ 'LspDiagnosticsUnderline'..key, { - \ 'cterm': 'underline', - \ 'gui': 'underline', - \ 'term': 'underline', - \ 'ctermfg': eval('c.'..value), - \ 'guisp': eval('g.'..value), - \ })) - call extend(rules, pgmnt#hi#group( - \ 'LspDiagnosticsDefault'..key, { - \ 'ctermfg': eval('c.'..value), - \ 'guifg': eval('g.'..value), - \ })) - call extend(rules, pgmnt#hi#group( - \ 'LspDiagnosticsSign'..key, { - \ 'ctermbg': c.linenr_bg, - \ 'ctermfg': eval('c.'..value), - \ 'guibg': g.linenr_bg, - \ 'guifg': eval('g.'..value), - \ })) - endfor - " Info color is hard to read within floating window, so use normal text - " color instead. - call extend(rules, pgmnt#hi#group( - \ 'LspDiagnosticsFloatingHint', { - \ 'ctermbg': c.pmenu_bg, - \ 'ctermfg': c.pmenu_fg, - \ 'guibg': g.pmenu_bg, - \ 'guifg': g.pmenu_fg, - \ })) - " }}} - - " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) + " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) {{{ for [key, value] in items({'Error': 'red', 'Warn': 'orange', 'Info': 'blue', 'Hint': 'linenr_fg'}) call extend(rules, pgmnt#hi#group( \ 'DiagnosticUnderline'..key, { @@ -911,6 +876,7 @@ function! s:create_links() abort call add(links, pgmnt#hi#link('typescriptMessage', 'icebergNormalFg')) call add(links, pgmnt#hi#link('typescriptNull', 'Constant')) call add(links, pgmnt#hi#link('typescriptParens', 'icebergNormalFg')) + " }}} return links endfunction From ee18cdb428f02fc49f9a26768844f1ca7bac3a07 Mon Sep 17 00:00:00 2001 From: cocopon Date: Tue, 28 Dec 2021 09:21:12 +0900 Subject: [PATCH 10/11] Refactor code --- colors/iceberg.vim | 2 +- src/iceberg.vim | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index 5d9f456..eda5836 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -5,7 +5,7 @@ " " File: iceberg.vim " Maintainer: cocopon -" Modified: 2021-12-27 20:06+0900 +" Modified: 2021-12-28 09:24+0900 " License: MIT diff --git a/src/iceberg.vim b/src/iceberg.vim index 7295593..2aed94d 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -595,26 +595,31 @@ function! s:create_colors(palette) abort " }}} " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) {{{ - for [key, value] in items({'Error': 'red', 'Warn': 'orange', 'Info': 'blue', 'Hint': 'linenr_fg'}) + for [group, color] in items({ + \ 'Error': 'red', + \ 'Hint': 'linenr_fg', + \ 'Info': 'blue', + \ 'Warn': 'orange', + \ }) call extend(rules, pgmnt#hi#group( - \ 'DiagnosticUnderline'..key, { + \ 'DiagnosticUnderline' . group, { \ 'cterm': 'underline', + \ 'ctermfg': c[color], \ 'gui': 'underline', + \ 'guisp': g[color], \ 'term': 'underline', - \ 'ctermfg': eval('c.'..value), - \ 'guisp': eval('g.'..value), \ })) call extend(rules, pgmnt#hi#group( - \ 'Diagnostic'..key, { - \ 'ctermfg': eval('c.'..value), - \ 'guifg': eval('g.'..value), + \ 'Diagnostic' . group, { + \ 'ctermfg': c[color], + \ 'guifg': g[color], \ })) call extend(rules, pgmnt#hi#group( - \ 'DiagnosticSign'..key, { + \ 'DiagnosticSign' . group, { \ 'ctermbg': c.linenr_bg, - \ 'ctermfg': eval('c.'..value), + \ 'ctermfg': c[color], \ 'guibg': g.linenr_bg, - \ 'guifg': eval('g.'..value), + \ 'guifg': g[color], \ })) endfor " Info color is hard to read within floating window, so use normal text From 39270affe35abfa2a0c094d88edeb559d1b773ea Mon Sep 17 00:00:00 2001 From: cocopon Date: Tue, 28 Dec 2021 09:45:47 +0900 Subject: [PATCH 11/11] Fine-tune coloration --- colors/iceberg.vim | 26 +++++++++++++------------- src/iceberg.vim | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/colors/iceberg.vim b/colors/iceberg.vim index eda5836..10e6394 100644 --- a/colors/iceberg.vim +++ b/colors/iceberg.vim @@ -5,7 +5,7 @@ " " File: iceberg.vim " Maintainer: cocopon -" Modified: 2021-12-28 09:24+0900 +" Modified: 2021-12-28 09:50+0900 " License: MIT @@ -119,12 +119,12 @@ if &background == 'light' hi TSMethod ctermfg=237 guifg=#505695 hi TSURI cterm=underline ctermfg=31 gui=underline guifg=#3f83a6 term=underline hi ZenSpace ctermbg=125 guibg=#cc517a - hi DiagnosticUnderlineInfo cterm=underline ctermfg=25 gui=underline guisp=#2d539e term=underline - hi DiagnosticInfo ctermfg=25 guifg=#2d539e - hi DiagnosticSignInfo ctermbg=253 ctermfg=25 guibg=#dcdfe7 guifg=#2d539e - hi DiagnosticUnderlineHint cterm=underline ctermfg=248 gui=underline guisp=#9fa7bd term=underline - hi DiagnosticHint ctermfg=248 guifg=#9fa7bd - hi DiagnosticSignHint ctermbg=253 ctermfg=248 guibg=#dcdfe7 guifg=#9fa7bd + hi DiagnosticUnderlineInfo cterm=underline ctermfg=31 gui=underline guisp=#3f83a6 term=underline + hi DiagnosticInfo ctermfg=31 guifg=#3f83a6 + hi DiagnosticSignInfo ctermbg=253 ctermfg=31 guibg=#dcdfe7 guifg=#3f83a6 + hi DiagnosticUnderlineHint cterm=underline ctermfg=244 gui=underline guisp=#8389a3 term=underline + hi DiagnosticHint ctermfg=244 guifg=#8389a3 + hi DiagnosticSignHint ctermbg=253 ctermfg=244 guibg=#dcdfe7 guifg=#8389a3 hi DiagnosticUnderlineWarn cterm=underline ctermfg=130 gui=underline guisp=#c57339 term=underline hi DiagnosticWarn ctermfg=130 guifg=#c57339 hi DiagnosticSignWarn ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339 @@ -253,12 +253,12 @@ else hi TSMethod ctermfg=252 guifg=#a3adcb hi TSURI cterm=underline ctermfg=109 gui=underline guifg=#89b8c2 term=underline hi ZenSpace ctermbg=203 guibg=#e27878 - hi DiagnosticUnderlineInfo cterm=underline ctermfg=110 gui=underline guisp=#84a0c6 term=underline - hi DiagnosticInfo ctermfg=110 guifg=#84a0c6 - hi DiagnosticSignInfo ctermbg=235 ctermfg=110 guibg=#1e2132 guifg=#84a0c6 - hi DiagnosticUnderlineHint cterm=underline ctermfg=239 gui=underline guisp=#444b71 term=underline - hi DiagnosticHint ctermfg=239 guifg=#444b71 - hi DiagnosticSignHint ctermbg=235 ctermfg=239 guibg=#1e2132 guifg=#444b71 + hi DiagnosticUnderlineInfo cterm=underline ctermfg=109 gui=underline guisp=#89b8c2 term=underline + hi DiagnosticInfo ctermfg=109 guifg=#89b8c2 + hi DiagnosticSignInfo ctermbg=235 ctermfg=109 guibg=#1e2132 guifg=#89b8c2 + hi DiagnosticUnderlineHint cterm=underline ctermfg=242 gui=underline guisp=#6b7089 term=underline + hi DiagnosticHint ctermfg=242 guifg=#6b7089 + hi DiagnosticSignHint ctermbg=235 ctermfg=242 guibg=#1e2132 guifg=#6b7089 hi DiagnosticUnderlineWarn cterm=underline ctermfg=216 gui=underline guisp=#e2a478 term=underline hi DiagnosticWarn ctermfg=216 guifg=#e2a478 hi DiagnosticSignWarn ctermbg=235 ctermfg=216 guibg=#1e2132 guifg=#e2a478 diff --git a/src/iceberg.vim b/src/iceberg.vim index 2aed94d..21382ef 100644 --- a/src/iceberg.vim +++ b/src/iceberg.vim @@ -597,8 +597,8 @@ function! s:create_colors(palette) abort " [Neovim built-in diagnostics](https://neovim.io/doc/user/diagnostic.html) {{{ for [group, color] in items({ \ 'Error': 'red', - \ 'Hint': 'linenr_fg', - \ 'Info': 'blue', + \ 'Hint': 'comment_fg', + \ 'Info': 'lblue', \ 'Warn': 'orange', \ }) call extend(rules, pgmnt#hi#group(