Reinstate g:solarized_use16.

Neovim ignores `&t_Co` and `&term`, so it is not possible in Neovim to
use the ANSI colors when `termguicolors` is not set.

Re-add this option to override the value of `s:t_Co`.

Fixes https://github.com/lifepillar/vim-solarized8/issues/71.
This commit is contained in:
Lifepillar
2019-06-26 19:33:28 +02:00
parent b36b068a56
commit de124fa1ea
4 changed files with 21 additions and 16 deletions

View File

@@ -48,9 +48,10 @@ you have two possibilities:
effect). effect).
2. Set your terminal's 16 ANSI colors (the colors in the range 015) to the 2. Set your terminal's 16 ANSI colors (the colors in the range 015) to the
Solarized palette and `set t_Co=16` in Vim. Be aware that, if you set `t_Co`, Solarized palette and `set t_Co=16` in Vim (or `let g:solarized_use16=1`). Be
but your terminal does not use the Solarized palette, your colors will be aware that, if you force the usage of your terminal colors, but your terminal
completely off. is not configured with the Solarized palette, your colors will be completely
off.
Finally, if your terminal does not support true colors, you must *not* set Finally, if your terminal does not support true colors, you must *not* set
`termguicolors`. `termguicolors`.
@@ -131,6 +132,7 @@ The following options were not available in the original Solarized:
Solarized's cursor style (default: `0`). By default, the cursor is orange/red 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 in light themes, and blue in dark themes (but please note that your terminal
may override the cursor's color). may override the cursor's color).
- `g:solarized_use16`: set to `1` to force using your 16 ANSI terminal colors.
- `g:solarized_extra_hi_groups`: set to `1` to enable Solarized - `g:solarized_extra_hi_groups`: set to `1` to enable Solarized
filetype-specific syntax highlighting groups (default is `0`). Please be aware filetype-specific syntax highlighting groups (default is `0`). Please be aware
that there is [a long standing issue](https://github.com/vim/vim/issues/4405) that there is [a long standing issue](https://github.com/vim/vim/issues/4405)

View File

@@ -1,4 +1,5 @@
# vim: ft=colortemplate fdm=marker # vim: ft=colortemplate fdm=marker
#let s:t_Co = get(g:, '@optionprefix_use16', 0) ? 16 : s:t_Co
#let s:italics = s:italics && get(g:, '@optionprefix_italics', 1) #let s:italics = s:italics && get(g:, '@optionprefix_italics', 1)
#let s:termtrans = get(g:, '@optionprefix_termtrans', 0) && !has('gui_running') #let s:termtrans = get(g:, '@optionprefix_termtrans', 0) && !has('gui_running')
Include: _linked_groups.colortemplate Include: _linked_groups.colortemplate

View File

@@ -23,6 +23,15 @@ Set to 1 to enable filetype-specific syntax highlight group.
NOTE: setting this to 1 may leave "a wake of destruction when switching away" 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 (T. Pope), that is, when you switch to a different colorscheme the
highlighting may look wrong or disabled. highlighting may look wrong or disabled.
*g:@optionprefix_italics*
Set to 0 if you do not want to enable italics. Note that the color scheme in
normal circumstances automatically detects whether italics is available. You
should never need to set this option explicitly. You may want to unset it if
you do not want Vim to display italics even when the feature is available
(e.g., in GUI versions of Vim).
>
let g:@optionprefix_italics = 1
<
*g:@optionprefix_old_cursor_style* *g:@optionprefix_old_cursor_style*
Set to 1 if you want to use the original Solarized's cursor style. By default, Set to 1 if you want to use the original Solarized's cursor style. By default,
@@ -37,21 +46,17 @@ in the flat variant (of course, `"flat"` does not have any effect in the flat
variant). variant).
> >
let g:@optionprefix_statusline = "normal" let g:@optionprefix_statusline = "normal"
<
*g:@optionprefix_italics*
Set to 0 if you do not want to enable italics. Note that the color scheme in
normal circumstances automatically detects whether italics is available. You
should never need to set this option explicitly. You may want to unset it if
you do not want Vim to display italics even when the feature is available
(e.g., in GUI versions of Vim).
>
let g:@optionprefix_italics = 1
< <
*g:@optionprefix_termtrans* *g:@optionprefix_termtrans*
Set to 1 if you want a transparent background. Takes effect only in the Set to 1 if you want a transparent background. Takes effect only in the
terminal. terminal.
> >
let g:@optionprefix_termtrans = 0 let g:@optionprefix_termtrans = 0
<
*g:@optionprefix_use16*
Set to 1 if you want to force using the 16 ANSI terminal colors.
>
let g:@optionprefix_use16 = 0
< <
*g:@optionprefix_visibility* *g:@optionprefix_visibility*
Tweak the visibility of a few elements. Allowed values are `"normal"` Tweak the visibility of a few elements. Allowed values are `"normal"`

View File

@@ -9,10 +9,7 @@ Include: _info.colortemplate
Include: _help.colortemplate Include: _help.colortemplate
# }}} # }}}
#let s:italics = s:italics && get(g:, '@optionprefix_italics', 1) Include: _global.colortemplate
#let s:termtrans = get(g:, '@optionprefix_termtrans', 0) && !has('gui_running')
Include: _linked_groups.colortemplate
Variant: gui 256 16 Variant: gui 256 16