From 4cd2050d71ac364fa4a689a8db8ad0fc51276807 Mon Sep 17 00:00:00 2001 From: Lifepillar Date: Sat, 11 Nov 2017 14:17:01 +0100 Subject: [PATCH] Document g:solarized_enable_extra_hi_groups. --- Readme.md | 5 +++++ colors/solarized8.vim | 10 +++++----- colors/solarized8_flat.vim | 10 +++++----- colors/solarized8_high.vim | 10 +++++----- colors/solarized8_low.vim | 10 +++++----- doc/solarized8.txt | 11 ++++++++++- templates/_extra.colortemplate | 2 +- templates/_help.colortemplate | 11 ++++++++++- 8 files changed, 46 insertions(+), 23 deletions(-) diff --git a/Readme.md b/Readme.md index 6c89791..f99d3d0 100644 --- a/Readme.md +++ b/Readme.md @@ -91,6 +91,11 @@ The following options were not available in the original Solarized: Solarized's cursor style (default: `0`). By default, the cursor is orange/red in light themes, and blue in dark themes (but please note that your terminal may override the cursor's color). +- `g:solarized_enable_extra_hi_groups`: set to `1` to enable Solarized + filetype-specific syntax highlighting groups (default is `0`). Please be aware + that there is [a long standing + issue](https://github.com/altercation/solarized/issues/102) with extra + highlight groups. - `g:solarized_use16`: see above. All these options may be used with any Solarized 8 variant. diff --git a/colors/solarized8.vim b/colors/solarized8.vim index 6865dfe..b1640df 100644 --- a/colors/solarized8.vim +++ b/colors/solarized8.vim @@ -4,7 +4,7 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Sat Nov 11 14:00:16 2017 +" Last Updated: Sat Nov 11 14:16:08 2017 if !(has('termguicolors') && &termguicolors) && !has('gui_running') \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) @@ -175,7 +175,7 @@ if !get(g:, 'solarized_use16', 0) hi ReplaceMode ctermfg=166 ctermbg=230 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -550,7 +550,7 @@ if !get(g:, 'solarized_use16', 0) hi ReplaceMode ctermfg=166 ctermbg=230 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -897,7 +897,7 @@ if &background ==# 'dark' hi ReplaceMode ctermfg=9 ctermbg=15 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -1254,7 +1254,7 @@ hi InsertMode ctermfg=6 ctermbg=15 guifg=#2aa198 guibg=#fdf6e3 guisp=NONE cterm= hi ReplaceMode ctermfg=9 ctermbg=15 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse -if get(g:, 'solarized_enable_extra_hi_groups', 1) +if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function diff --git a/colors/solarized8_flat.vim b/colors/solarized8_flat.vim index ee58e34..dfa182f 100644 --- a/colors/solarized8_flat.vim +++ b/colors/solarized8_flat.vim @@ -4,7 +4,7 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Sat Nov 11 14:00:19 2017 +" Last Updated: Sat Nov 11 14:16:11 2017 if !(has('termguicolors') && &termguicolors) && !has('gui_running') \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) @@ -169,7 +169,7 @@ if !get(g:, 'solarized_use16', 0) hi Underlined ctermfg=61 ctermbg=NONE guifg=#6c71c4 guibg=NONE guisp=NONE cterm=NONE gui=NONE hi! link lCursor Cursor hi CursorIM ctermfg=NONE ctermbg=fg guifg=NONE guibg=fg guisp=NONE cterm=NONE gui=NONE - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -538,7 +538,7 @@ if !get(g:, 'solarized_use16', 0) hi Underlined ctermfg=61 ctermbg=NONE guifg=#6c71c4 guibg=NONE guisp=NONE cterm=NONE gui=NONE hi! link lCursor Cursor hi CursorIM ctermfg=NONE ctermbg=fg guifg=NONE guibg=fg guisp=NONE cterm=NONE gui=NONE - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -879,7 +879,7 @@ if &background ==# 'dark' hi Underlined ctermfg=13 ctermbg=NONE guifg=#6c71c4 guibg=NONE guisp=NONE cterm=NONE gui=NONE hi! link lCursor Cursor hi CursorIM ctermfg=NONE ctermbg=fg guifg=NONE guibg=fg guisp=NONE cterm=NONE gui=NONE - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -1230,7 +1230,7 @@ hi! link Typedef Type hi Underlined ctermfg=13 ctermbg=NONE guifg=#6c71c4 guibg=NONE guisp=NONE cterm=NONE gui=NONE hi! link lCursor Cursor hi CursorIM ctermfg=NONE ctermbg=fg guifg=NONE guibg=fg guisp=NONE cterm=NONE gui=NONE -if get(g:, 'solarized_enable_extra_hi_groups', 1) +if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function diff --git a/colors/solarized8_high.vim b/colors/solarized8_high.vim index 55d0055..e04bf21 100644 --- a/colors/solarized8_high.vim +++ b/colors/solarized8_high.vim @@ -4,7 +4,7 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Sat Nov 11 14:00:22 2017 +" Last Updated: Sat Nov 11 14:16:15 2017 if !(has('termguicolors') && &termguicolors) && !has('gui_running') \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) @@ -175,7 +175,7 @@ if !get(g:, 'solarized_use16', 0) hi ReplaceMode ctermfg=166 ctermbg=230 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -550,7 +550,7 @@ if !get(g:, 'solarized_use16', 0) hi ReplaceMode ctermfg=166 ctermbg=230 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -897,7 +897,7 @@ if &background ==# 'dark' hi ReplaceMode ctermfg=9 ctermbg=15 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -1254,7 +1254,7 @@ hi InsertMode ctermfg=6 ctermbg=15 guifg=#2aa198 guibg=#fdf6e3 guisp=NONE cterm= hi ReplaceMode ctermfg=9 ctermbg=15 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse -if get(g:, 'solarized_enable_extra_hi_groups', 1) +if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function diff --git a/colors/solarized8_low.vim b/colors/solarized8_low.vim index 1a28512..ff8741b 100644 --- a/colors/solarized8_low.vim +++ b/colors/solarized8_low.vim @@ -4,7 +4,7 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Sat Nov 11 14:00:26 2017 +" Last Updated: Sat Nov 11 14:16:18 2017 if !(has('termguicolors') && &termguicolors) && !has('gui_running') \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) @@ -175,7 +175,7 @@ if !get(g:, 'solarized_use16', 0) hi ReplaceMode ctermfg=166 ctermbg=230 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -550,7 +550,7 @@ if !get(g:, 'solarized_use16', 0) hi ReplaceMode ctermfg=166 ctermbg=230 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=162 ctermbg=230 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -897,7 +897,7 @@ if &background ==# 'dark' hi ReplaceMode ctermfg=9 ctermbg=15 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse - if get(g:, 'solarized_enable_extra_hi_groups', 1) + if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function @@ -1254,7 +1254,7 @@ hi InsertMode ctermfg=6 ctermbg=15 guifg=#2aa198 guibg=#fdf6e3 guisp=NONE cterm= hi ReplaceMode ctermfg=9 ctermbg=15 guifg=#cb4b16 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi VisualMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse hi CommandMode ctermfg=5 ctermbg=15 guifg=#d33682 guibg=#fdf6e3 guisp=NONE cterm=NONE,reverse gui=NONE,reverse -if get(g:, 'solarized_enable_extra_hi_groups', 1) +if get(g:, 'solarized_enable_extra_hi_groups', 0) hi! link vimVar Identifier hi! link vimFunc Function hi! link vimUserFunc Function diff --git a/doc/solarized8.txt b/doc/solarized8.txt index 7517664..e19a8c5 100644 --- a/doc/solarized8.txt +++ b/doc/solarized8.txt @@ -28,7 +28,16 @@ Tweak the way diffs are displayed. Allowed values are `"normal"` (default), `"high"`, and `"low"`. > let g:solarized_diffmode = "normal" -< *g:solarized_old_cursor_style* +< + *g:solarized_enable_extra_hi_groups* +Set to 1 to enable filetype-specific syntax highlight group. +> + let g:solarized_enable_extra_hi_groups = 0 +< +NOTE: setting this to 1 may leave "a wake of destruction when switching away" +(T. Pope), that is, when you switch to a different colorscheme the +highlighting may look wrong or disabled. + *g:solarized_old_cursor_style* Set to 1 if you want to use the original Solarized's cursor style. By default, the cursor is blue. NOTE: your terminal may override the cursor's color. > diff --git a/templates/_extra.colortemplate b/templates/_extra.colortemplate index 8d090ea..b64a480 100644 --- a/templates/_extra.colortemplate +++ b/templates/_extra.colortemplate @@ -1,7 +1,7 @@ # vim: ft=colortemplate fdm=marker # Filetype specific highlight groups {{{ verbatim -if get(g:, '@optionprefix_enable_extra_hi_groups', 1) +if get(g:, '@optionprefix_enable_extra_hi_groups', 0) endverbatim # vim {{{ vimVar -> Identifier diff --git a/templates/_help.colortemplate b/templates/_help.colortemplate index 901d947..edbb881 100644 --- a/templates/_help.colortemplate +++ b/templates/_help.colortemplate @@ -31,7 +31,16 @@ Tweak the way diffs are displayed. Allowed values are `"normal"` (default), `"high"`, and `"low"`. > let g:@optionprefix_diffmode = "normal" -< *g:@optionprefix_old_cursor_style* +< + *g:@optionprefix_enable_extra_hi_groups* +Set to 1 to enable filetype-specific syntax highlight group. +> + let g:@optionprefix_enable_extra_hi_groups = 0 +< +NOTE: setting this to 1 may leave "a wake of destruction when switching away" +(T. Pope), that is, when you switch to a different colorscheme the +highlighting may look wrong or disabled. + *g:@optionprefix_old_cursor_style* Set to 1 if you want to use the original Solarized's cursor style. By default, the cursor is blue. NOTE: your terminal may override the cursor's color. >