overcache / neosolarized Goto Github PK
View Code? Open in Web Editor NEWNeoSolarized: A fixed solarized colorscheme for better truecolor support.
License: MIT License
NeoSolarized: A fixed solarized colorscheme for better truecolor support.
License: MIT License
I have an issue with this and urxvt - the background is messed up.
Colour support:
How it looks in nvim:
init.vm: http://i.imgur.com/bm0zCGU.png
It works fine with nvim-qt.
Running the following script in my terminal emulator, and the Neovim terminal, produce different output:
#!/bin/bash
for i in {30..37}
do
printf "Color $i: \033[${i}m NOT BOLD \033[0m - \033[${i};1m BOLD \033[0m\n"
done
Neovim Terminal:
(I use Kitty, and I've defined the 16 terminal colors to be the same as those used by NeoSolarized.)
I first noticed this issue when the output of ls
didn't look right in Neovim's terminal. This issue only shows up when terminal commands output colored text using ANSI escape codes 30–37
(foreground colors) along with the bold code 1
.
The discrepancy is due to Kitty having made the decision render bold text as the same color but bold (which makes a heck of a lot of sense to me), as opposed to the traditional behavior (bold as bright) which is to bold the text but also shift the color to the corresponding background color (40–47).
To fix this, I added the following in my init.vim
:
" Automatically update some setting related to colors
augroup update_colors_autocommands
au!
au ColorScheme,VimEnter * call UpdateColors()
augroup END
function! UpdateColors()
" Style ChooseWin to fit in with NeoSolarized colors
let g:choosewin_color_label = {'gui': [g:terminal_color_2 , g:terminal_color_15, 'bold'], 'cterm': [2 , 15, 'bold']}
let g:choosewin_color_label_current = {'gui': [g:terminal_color_11, g:terminal_color_0 ] , 'cterm': [11, 0 ]}
let g:choosewin_color_other = {'gui': [g:terminal_color_11, g:terminal_color_11] , 'cterm': [11, 11]}
let g:choosewin_color_land = {'gui': [g:terminal_color_3 , g:terminal_color_0 ] , 'cterm': [3 , 0 ]}
" Make term colors 8-15 the same as 0-7 to get around bold as bright issue.
let g:terminal_color_8 = g:terminal_color_0
let g:terminal_color_9 = g:terminal_color_1
let g:terminal_color_10 = g:terminal_color_2
let g:terminal_color_11 = g:terminal_color_3
let g:terminal_color_12 = g:terminal_color_4
let g:terminal_color_13 = g:terminal_color_5
let g:terminal_color_14 = g:terminal_color_6
let g:terminal_color_15 = g:terminal_color_7
endfunction
It took a lot of time/frustration to figure out what was going on here, and while NeoSolarized isn't doing anything wrong by setting g:terminal_color[0-15]
the way it does, https://github.com/icymind/NeoSolarized/blob/1af4bf6835f0fbf156c6391dc228cae6ea967053/colors/NeoSolarized.vim#L864-L879
I think it would be great if some changes could be made to make this easier for others in the future.
The easiest thing to do (which I've seen in other colorschemes) would be to change the definitions of g:terminal_colors[0-15]
to:
let g:terminal_color_0 = s:gui_base03
let g:terminal_color_1 = s:gui_red
let g:terminal_color_2 = s:gui_green
let g:terminal_color_3 = s:gui_yellow
let g:terminal_color_4 = s:gui_blue
let g:terminal_color_5 = s:gui_magenta
let g:terminal_color_6 = s:gui_cyan
let g:terminal_color_7 = s:gui_base2
let g:terminal_color_8 = g:terminal_color_0
let g:terminal_color_9 = g:terminal_color_1
let g:terminal_color_10 = g:terminal_color_2
let g:terminal_color_11 = g:terminal_color_3
let g:terminal_color_12 = g:terminal_color_4
let g:terminal_color_13 = g:terminal_color_5
let g:terminal_color_14 = g:terminal_color_6
let g:terminal_color_15 = g:terminal_color_7
However, that might be surprising/annoying to a bunch of users of the colorscheme who for whatever reason like the default behavior.
So maybe the right solution would be to add a new option like g:neosolazired_boldasbright
which by default is equal to 1
, so nothing changes for existing users, but when set to 0
it sets the term colors as above. (Setting the default to 0
would be a more aggressive change, but is maybe worth considering. Probably comes down to the behavior most people will expect by default for how bold shows up in the terminal.)
(As an aside, either solution above would break some other parts of my config, like the lines above starting with let g:choosewin_color
. I'd separately love it if this color scheme defined some global variables that correspond to the hex code for each of the colors so I could use them elsewhere in my config (e.g., let g:neosolarize_base03 = '#002b36'
).
I'd be happy to file a pull request implementing whatever version of the above seems most sensible to you.
Also thanks for making NeoSolarized, I was so happy when I found it 😄.
Thanks for creating this colorscheme! I am happily using it with NeoVim.
I am wondering if the visual difference between IncSearch
and Search
is intended. Search
sets the background color and is very easy to spot. IncSearch
only sets the foreground color and I am unable to spot the incremental search result on the screen as the difference is so subtle. This makes incremental search not very useful.
I am very satisfied with the following patch. Maybe you want to incorporate it or provide an additional config flag?
@@ -466,7 +466,7 @@ exe "hi! StatusLineNC" .s:fmt_none .s:fg_base00 .s:bg_base02 .s:fmt_revbb
exe "hi! Visual" .s:fmt_none .s:fg_base01 .s:bg_base03 .s:fmt_revbb
exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none
exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none
-exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none
+exe "hi! IncSearch" .s:fmt_revr .s:fg_orange .s:bg_none
exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none
exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none
exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none
I am a fan of this colorscheme and was wondering if it supports floating windows too. I was unable to figure this out.
I am using NVIM v0.2.0-45-g7666b49 inside tmux 2.3 in gnome-terminal on Debian Jessie, all of which are properly setup to display true color. I am using three 24 bit colorschemes and want to be able to switch between them:
However, as soon as I use the NeoSolarized colorscheme once - whether I set it in my init.vim or via :colorscheme NeoSolarized
makes no difference - the other two colorschemes no longer look as they did before when I reactivate them with :colo tender
or :colo onedark
. Some words that used to be highlighted with color before are no longer highlighted with a color. This happens only when I use the NeoSolarized colorscheme - between the other two I can switch without any problems.
Steps to reproduce:
call plug#begin()
" three 24bit/truecolor colorschemes used for this example
Plug 'jacoborus/tender'
Plug 'joshdick/onedark.vim'
Plug 'iCyMind/NeoSolarized'
call plug#end()
set termguicolors
set background=dark
colorscheme tender
:colo onedark
. They are still all colored.):colo tender
. Still colored.):colo NeoSolarized
. They are still colored.:colo tender
or :colo onedark
. The words call, set and colorscheme in init.vim are no longer colored.Alternative way to reproduce:
Take the init.vim given above an replace the last line (colorscheme tender
) with colorscheme NeoSolarized
. Run :colo tender
or :colo onedark
. The words call, set and colorscheme in init.vim are no longer colored.
My vim setting:(vim 8.0 )
" some color scheme....
Plug 'sjl/badwolf'
Plug 'iCyMind/NeoSolarized'
Plug 'cocopon/iceberg.vim'
Plug 'tomasr/molokai'
Plug 'morhetz/gruvbox'
Plug 'NLKNguyen/papercolor-theme'
Plug 'KabbAmine/yowish.vim'
" .....
let g:neosolarized_bold = 1
let g:neosolarized_underline = 1
let g:neosolarized_italic = 0
set background=dark
if (has("termguicolors"))
set termguicolors
endif
My zsh setting:(zsh 5.2)
# run tmux
which tmux > /dev/null
if [[ $? -eq 0 ]]; then
case $- in *i*)
[ -z "$TMUX" ] && exec $(tmux -2)
esac
fi
export TERM=xterm-256color
My tmux setting:(tmux 2.4)
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g default-terminal "screen-256color"
NeoSolarized's color is not correct while papercolor-theme is correct.
The first screenshot in the readme shows the gitgutter add sign using the Solarized green colour, but when I load the colourscheme it's using the gitgutter built-in green. I don't see any of the gitgutter highlight groups in NeoSolarized.vim
Hi,
I installed this theme and all works great, but vim-airline doesn't switch.
I have neovim 0.5 and minpac.
set background=light
set termguicolors
colorscheme NeoSolarized
Any help would be appreciated.
Thanks
when using this colorscheme with neovim and indent-blankline, a bug similar to this appears:
lukas-reineke/indent-blankline.nvim#41
It seems to be specific to this color scheme though. Do you have any guidance on what the problem is?
The following was enough for me to reproduce the issue in neovim 0.5.1 (make a visual block selection where the indents are):
call plug#begin()
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'overcache/NeoSolarized'
call plug#end()
set termguicolors
syntax enable
set background=dark
colorscheme NeoSolarized
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.