cannot get color schemes to display correctly in neovimHow to make Vim display colors as indicated by color...

Does this circuit have marginal voltage level problem?

How might boat designs change in order to allow them to be pulled by dragons?

Was Wolfgang Unzicker the last Amateur GM?

When should we use dependency injection (C#)

Does a reference have a storage location?

How did sloshing prevent the Apollo Service Module from moving safely away from the Command Module and how was this fixed?

How is /a/ pronounced before n/m in French?

Why would a propellor have blades of different lengths?

Performance of loop vs expansion

Isn't "Dave's protocol" good if only the database, and not the code, is leaked?

How to compute the number of centroids for K-means clustering algorithm given minimal distance?

What can a novel do that film and TV cannot?

My mother co-signed for my car. Can she take it away from me if I am the one making car payments?

How long had Bertha Mason been in the attic at the point of the events in Jane Eyre

Do I need to be legally qualified to install a Hive smart thermostat?

What do you call the angle of the direction of an airplane?

Do human thoughts interact with matter?

What instances can be solved today by modern solvers (pure LP)?

Why did moving the mouse cursor cause Windows 95 to run more quickly?

Has there ever been a cold war other than between the U.S. and the U.S.S.R.?

Old story where computer expert digitally animates The Lord of the Rings

Does the North Korea Kim Jong Un have an heir?

How can solar sailed ships be protected from space debris?

Contributing to a candidate as a Foreign National US Resident?



cannot get color schemes to display correctly in neovim


How to make Vim display colors as indicated by color codes?How to get VIM to display 256 colors properlyHow can I get vim to return to normal tab display?Cannot get vim to recognize unicodemutt: how to display emoji characters correctly?Cannot get YouCompleteMe to functionVim in tmux does not correctly determine background colorAIX 7.1, Vim error after Yum upgrade. Cannot allocate color SlateBlueHow can I get neovim to load my init.vim file when in sudo mode?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I've been fiddling with neovim color schemes for a while now, and cannot make them look same as on previews.



I'm using terminal.app on osx, and thought it was 256 color cap problem, so I moved to iterm2 which has true color support - while it improved some things, color schemes are nowhere near to screenshots I see!



enter image description here



this is how solarized theme looks in iterm2 + neovim



enter image description here



this is nothing close to https://github.com/altercation/vim-colors-solarized screenshots!



I've used google foo but without success, surely there is a way to get colors right. Any ideas?



  "*****************************************************************************
"" Plug install packages
"*****************************************************************************

" Specify a directory for plugins
call plug#begin('~/.config/nvim/plugged')

Plug 'tomasr/molokai'
Plug 'dracula/vim'
Plug 'justb3a/vim-smarties'
Plug 'tyrannicaltoucan/vim-quantum' " let g:quantum_black = 1
Plug 'mhartington/oceanic-next'
Plug 'altercation/vim-colors-solarized'
" Plug 'vim-scripts/CSApprox'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'bronson/vim-trailing-whitespace'
Plug 'editorconfig/editorconfig-vim'
Plug 'Raimondi/delimitMate'
Plug 'scrooloose/syntastic'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-commentary'
Plug 'sheerun/vim-polyglot'
Plug 'valloric/matchtagalways'

" Initialize plugin system
call plug#end()

"*****************************************************************************
"" Visual Settings
"*****************************************************************************
set number
set ruler
set nowrap

let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors " unfortunately doesn't work in terminal.app - needs true color support, like iterm2 but it lags and diff in visuals is not that much so sticking to terminal.app for now

set background=dark
colorscheme solarized

"*****************************************************************************
"" NERDTree config
"*****************************************************************************

" open NERDTree automatically when vim starts up on opening a directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

" keep focus on NERDTree when opening a directory
autocmd VimEnter * wincmd p

" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

"*****************************************************************************
"" Optimizations
"*****************************************************************************

set lazyredraw

let g:python_host_skip_check = 1
let g:python3_host_skip_check = 1

"*****************************************************************************
"" syntastic
"*****************************************************************************

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

"*****************************************************************************
"" yank and cut to osx clipboard
"*****************************************************************************

noremap YY "+y<CR>
noremap XX "+x<CR>

"*****************************************************************************
"" indent
"*****************************************************************************

" tabs
set listchars=tab:˗ ,eol:¬
set list

" spaces
let g:indentLine_enabled = 1
let g:indentLine_concealcursor = 0
let g:indentLine_char = '·'
let g:indentLine_faster = 1

set tabstop=2

"*****************************************************************************
"" matchtagalways
"*****************************************************************************

let g:mta_filetypes = { 'html' : 1, 'xhtml' : 1, 'xml' : 1, 'jinja' : 1, 'php': 1 }

"*****************************************************************************
"" ctrlp
"*****************************************************************************

set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
let g:ctrlp_custom_ignore = 'v[/](node_modules|target|dist)|(.(swp|tox|ico|git|hg|svn))$'









share|improve this question














bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Try let g:solarized_termcolors=256 in your config file.

    – vatsug
    Jan 11 '17 at 19:58











  • @vatsug tried, doesn't help. btw, this happens with every color I find on vimcolors.com it seems like a big issue.

    – user66044
    Jan 11 '17 at 20:05











  • What happens when you do a like-for-like comparison using the same programming language?

    – JdeBP
    Jan 11 '17 at 20:58











  • @JdeBP colors are way off without any logic to it. I managed to get solarized working properly in vim by setting terminal profile to slarized color scheme. But this is not possible for other colors only solarized.

    – user66044
    Jan 11 '17 at 21:14


















0















I've been fiddling with neovim color schemes for a while now, and cannot make them look same as on previews.



I'm using terminal.app on osx, and thought it was 256 color cap problem, so I moved to iterm2 which has true color support - while it improved some things, color schemes are nowhere near to screenshots I see!



enter image description here



this is how solarized theme looks in iterm2 + neovim



enter image description here



this is nothing close to https://github.com/altercation/vim-colors-solarized screenshots!



I've used google foo but without success, surely there is a way to get colors right. Any ideas?



  "*****************************************************************************
"" Plug install packages
"*****************************************************************************

" Specify a directory for plugins
call plug#begin('~/.config/nvim/plugged')

Plug 'tomasr/molokai'
Plug 'dracula/vim'
Plug 'justb3a/vim-smarties'
Plug 'tyrannicaltoucan/vim-quantum' " let g:quantum_black = 1
Plug 'mhartington/oceanic-next'
Plug 'altercation/vim-colors-solarized'
" Plug 'vim-scripts/CSApprox'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'bronson/vim-trailing-whitespace'
Plug 'editorconfig/editorconfig-vim'
Plug 'Raimondi/delimitMate'
Plug 'scrooloose/syntastic'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-commentary'
Plug 'sheerun/vim-polyglot'
Plug 'valloric/matchtagalways'

" Initialize plugin system
call plug#end()

"*****************************************************************************
"" Visual Settings
"*****************************************************************************
set number
set ruler
set nowrap

let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors " unfortunately doesn't work in terminal.app - needs true color support, like iterm2 but it lags and diff in visuals is not that much so sticking to terminal.app for now

set background=dark
colorscheme solarized

"*****************************************************************************
"" NERDTree config
"*****************************************************************************

" open NERDTree automatically when vim starts up on opening a directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

" keep focus on NERDTree when opening a directory
autocmd VimEnter * wincmd p

" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

"*****************************************************************************
"" Optimizations
"*****************************************************************************

set lazyredraw

let g:python_host_skip_check = 1
let g:python3_host_skip_check = 1

"*****************************************************************************
"" syntastic
"*****************************************************************************

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

"*****************************************************************************
"" yank and cut to osx clipboard
"*****************************************************************************

noremap YY "+y<CR>
noremap XX "+x<CR>

"*****************************************************************************
"" indent
"*****************************************************************************

" tabs
set listchars=tab:˗ ,eol:¬
set list

" spaces
let g:indentLine_enabled = 1
let g:indentLine_concealcursor = 0
let g:indentLine_char = '·'
let g:indentLine_faster = 1

set tabstop=2

"*****************************************************************************
"" matchtagalways
"*****************************************************************************

let g:mta_filetypes = { 'html' : 1, 'xhtml' : 1, 'xml' : 1, 'jinja' : 1, 'php': 1 }

"*****************************************************************************
"" ctrlp
"*****************************************************************************

set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
let g:ctrlp_custom_ignore = 'v[/](node_modules|target|dist)|(.(swp|tox|ico|git|hg|svn))$'









share|improve this question














bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Try let g:solarized_termcolors=256 in your config file.

    – vatsug
    Jan 11 '17 at 19:58











  • @vatsug tried, doesn't help. btw, this happens with every color I find on vimcolors.com it seems like a big issue.

    – user66044
    Jan 11 '17 at 20:05











  • What happens when you do a like-for-like comparison using the same programming language?

    – JdeBP
    Jan 11 '17 at 20:58











  • @JdeBP colors are way off without any logic to it. I managed to get solarized working properly in vim by setting terminal profile to slarized color scheme. But this is not possible for other colors only solarized.

    – user66044
    Jan 11 '17 at 21:14














0












0








0








I've been fiddling with neovim color schemes for a while now, and cannot make them look same as on previews.



I'm using terminal.app on osx, and thought it was 256 color cap problem, so I moved to iterm2 which has true color support - while it improved some things, color schemes are nowhere near to screenshots I see!



enter image description here



this is how solarized theme looks in iterm2 + neovim



enter image description here



this is nothing close to https://github.com/altercation/vim-colors-solarized screenshots!



I've used google foo but without success, surely there is a way to get colors right. Any ideas?



  "*****************************************************************************
"" Plug install packages
"*****************************************************************************

" Specify a directory for plugins
call plug#begin('~/.config/nvim/plugged')

Plug 'tomasr/molokai'
Plug 'dracula/vim'
Plug 'justb3a/vim-smarties'
Plug 'tyrannicaltoucan/vim-quantum' " let g:quantum_black = 1
Plug 'mhartington/oceanic-next'
Plug 'altercation/vim-colors-solarized'
" Plug 'vim-scripts/CSApprox'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'bronson/vim-trailing-whitespace'
Plug 'editorconfig/editorconfig-vim'
Plug 'Raimondi/delimitMate'
Plug 'scrooloose/syntastic'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-commentary'
Plug 'sheerun/vim-polyglot'
Plug 'valloric/matchtagalways'

" Initialize plugin system
call plug#end()

"*****************************************************************************
"" Visual Settings
"*****************************************************************************
set number
set ruler
set nowrap

let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors " unfortunately doesn't work in terminal.app - needs true color support, like iterm2 but it lags and diff in visuals is not that much so sticking to terminal.app for now

set background=dark
colorscheme solarized

"*****************************************************************************
"" NERDTree config
"*****************************************************************************

" open NERDTree automatically when vim starts up on opening a directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

" keep focus on NERDTree when opening a directory
autocmd VimEnter * wincmd p

" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

"*****************************************************************************
"" Optimizations
"*****************************************************************************

set lazyredraw

let g:python_host_skip_check = 1
let g:python3_host_skip_check = 1

"*****************************************************************************
"" syntastic
"*****************************************************************************

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

"*****************************************************************************
"" yank and cut to osx clipboard
"*****************************************************************************

noremap YY "+y<CR>
noremap XX "+x<CR>

"*****************************************************************************
"" indent
"*****************************************************************************

" tabs
set listchars=tab:˗ ,eol:¬
set list

" spaces
let g:indentLine_enabled = 1
let g:indentLine_concealcursor = 0
let g:indentLine_char = '·'
let g:indentLine_faster = 1

set tabstop=2

"*****************************************************************************
"" matchtagalways
"*****************************************************************************

let g:mta_filetypes = { 'html' : 1, 'xhtml' : 1, 'xml' : 1, 'jinja' : 1, 'php': 1 }

"*****************************************************************************
"" ctrlp
"*****************************************************************************

set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
let g:ctrlp_custom_ignore = 'v[/](node_modules|target|dist)|(.(swp|tox|ico|git|hg|svn))$'









share|improve this question














I've been fiddling with neovim color schemes for a while now, and cannot make them look same as on previews.



I'm using terminal.app on osx, and thought it was 256 color cap problem, so I moved to iterm2 which has true color support - while it improved some things, color schemes are nowhere near to screenshots I see!



enter image description here



this is how solarized theme looks in iterm2 + neovim



enter image description here



this is nothing close to https://github.com/altercation/vim-colors-solarized screenshots!



I've used google foo but without success, surely there is a way to get colors right. Any ideas?



  "*****************************************************************************
"" Plug install packages
"*****************************************************************************

" Specify a directory for plugins
call plug#begin('~/.config/nvim/plugged')

Plug 'tomasr/molokai'
Plug 'dracula/vim'
Plug 'justb3a/vim-smarties'
Plug 'tyrannicaltoucan/vim-quantum' " let g:quantum_black = 1
Plug 'mhartington/oceanic-next'
Plug 'altercation/vim-colors-solarized'
" Plug 'vim-scripts/CSApprox'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'bronson/vim-trailing-whitespace'
Plug 'editorconfig/editorconfig-vim'
Plug 'Raimondi/delimitMate'
Plug 'scrooloose/syntastic'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-commentary'
Plug 'sheerun/vim-polyglot'
Plug 'valloric/matchtagalways'

" Initialize plugin system
call plug#end()

"*****************************************************************************
"" Visual Settings
"*****************************************************************************
set number
set ruler
set nowrap

let $NVIM_TUI_ENABLE_TRUE_COLOR=1
set termguicolors " unfortunately doesn't work in terminal.app - needs true color support, like iterm2 but it lags and diff in visuals is not that much so sticking to terminal.app for now

set background=dark
colorscheme solarized

"*****************************************************************************
"" NERDTree config
"*****************************************************************************

" open NERDTree automatically when vim starts up on opening a directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

" keep focus on NERDTree when opening a directory
autocmd VimEnter * wincmd p

" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

"*****************************************************************************
"" Optimizations
"*****************************************************************************

set lazyredraw

let g:python_host_skip_check = 1
let g:python3_host_skip_check = 1

"*****************************************************************************
"" syntastic
"*****************************************************************************

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

"*****************************************************************************
"" yank and cut to osx clipboard
"*****************************************************************************

noremap YY "+y<CR>
noremap XX "+x<CR>

"*****************************************************************************
"" indent
"*****************************************************************************

" tabs
set listchars=tab:˗ ,eol:¬
set list

" spaces
let g:indentLine_enabled = 1
let g:indentLine_concealcursor = 0
let g:indentLine_char = '·'
let g:indentLine_faster = 1

set tabstop=2

"*****************************************************************************
"" matchtagalways
"*****************************************************************************

let g:mta_filetypes = { 'html' : 1, 'xhtml' : 1, 'xml' : 1, 'jinja' : 1, 'php': 1 }

"*****************************************************************************
"" ctrlp
"*****************************************************************************

set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__
let g:ctrlp_custom_ignore = 'v[/](node_modules|target|dist)|(.(swp|tox|ico|git|hg|svn))$'






vim






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 11 '17 at 19:44







user66044












bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 hour ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Try let g:solarized_termcolors=256 in your config file.

    – vatsug
    Jan 11 '17 at 19:58











  • @vatsug tried, doesn't help. btw, this happens with every color I find on vimcolors.com it seems like a big issue.

    – user66044
    Jan 11 '17 at 20:05











  • What happens when you do a like-for-like comparison using the same programming language?

    – JdeBP
    Jan 11 '17 at 20:58











  • @JdeBP colors are way off without any logic to it. I managed to get solarized working properly in vim by setting terminal profile to slarized color scheme. But this is not possible for other colors only solarized.

    – user66044
    Jan 11 '17 at 21:14



















  • Try let g:solarized_termcolors=256 in your config file.

    – vatsug
    Jan 11 '17 at 19:58











  • @vatsug tried, doesn't help. btw, this happens with every color I find on vimcolors.com it seems like a big issue.

    – user66044
    Jan 11 '17 at 20:05











  • What happens when you do a like-for-like comparison using the same programming language?

    – JdeBP
    Jan 11 '17 at 20:58











  • @JdeBP colors are way off without any logic to it. I managed to get solarized working properly in vim by setting terminal profile to slarized color scheme. But this is not possible for other colors only solarized.

    – user66044
    Jan 11 '17 at 21:14

















Try let g:solarized_termcolors=256 in your config file.

– vatsug
Jan 11 '17 at 19:58





Try let g:solarized_termcolors=256 in your config file.

– vatsug
Jan 11 '17 at 19:58













@vatsug tried, doesn't help. btw, this happens with every color I find on vimcolors.com it seems like a big issue.

– user66044
Jan 11 '17 at 20:05





@vatsug tried, doesn't help. btw, this happens with every color I find on vimcolors.com it seems like a big issue.

– user66044
Jan 11 '17 at 20:05













What happens when you do a like-for-like comparison using the same programming language?

– JdeBP
Jan 11 '17 at 20:58





What happens when you do a like-for-like comparison using the same programming language?

– JdeBP
Jan 11 '17 at 20:58













@JdeBP colors are way off without any logic to it. I managed to get solarized working properly in vim by setting terminal profile to slarized color scheme. But this is not possible for other colors only solarized.

– user66044
Jan 11 '17 at 21:14





@JdeBP colors are way off without any logic to it. I managed to get solarized working properly in vim by setting terminal profile to slarized color scheme. But this is not possible for other colors only solarized.

– user66044
Jan 11 '17 at 21:14










1 Answer
1






active

oldest

votes


















0














Every color scheme defines terminal colors separately from GUI colors. Traditionally, terminals supported at most 256 colors, and they mostly use a palette of 16 colors. GUIs commonly support 24-bit colors, so Vim (and Neovim) provide separate highlighting settings for color scheme authors.



Nowadays, many modern terminals support 24-bit colors as well. However, even when running in such a terminal, Neovim normally uses the terminal colors scheme and the 256-color rendering methods. This setting



set termguicolors


causes Neovim to render 24-bit colors, using the GUI color scheme settings. However, this does not cause Neovim to pretend that it is actually running in a GUI—that is, has('gui_running') is correctly still false.



Unfortunately, due to the historic conflation of GUI mode with 24-bit color mode, you may find that some addons do not handle termguicolors correctly. Your situation is such a scenario. The current implementation of vim-solarized-colors uses has('gui_running') to set the correct colors for 24-bit color mode, so it ends up setting an odd mish-mash of wrong values when Neovim uses 24-bit colors but is not running in a GUI.



Fortunately, the fix is quite simple: patch vim-solarized-colors to abide by &termguicolors where appropriate. You can find the patch in this commit on my fork of the addon. Incidentally, that fork contains some other patches that you may find useful. Feel free to point to it in your Vim config or apply the patches to your own version as you like.






share|improve this answer


























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f336670%2fcannot-get-color-schemes-to-display-correctly-in-neovim%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown
























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Every color scheme defines terminal colors separately from GUI colors. Traditionally, terminals supported at most 256 colors, and they mostly use a palette of 16 colors. GUIs commonly support 24-bit colors, so Vim (and Neovim) provide separate highlighting settings for color scheme authors.



    Nowadays, many modern terminals support 24-bit colors as well. However, even when running in such a terminal, Neovim normally uses the terminal colors scheme and the 256-color rendering methods. This setting



    set termguicolors


    causes Neovim to render 24-bit colors, using the GUI color scheme settings. However, this does not cause Neovim to pretend that it is actually running in a GUI—that is, has('gui_running') is correctly still false.



    Unfortunately, due to the historic conflation of GUI mode with 24-bit color mode, you may find that some addons do not handle termguicolors correctly. Your situation is such a scenario. The current implementation of vim-solarized-colors uses has('gui_running') to set the correct colors for 24-bit color mode, so it ends up setting an odd mish-mash of wrong values when Neovim uses 24-bit colors but is not running in a GUI.



    Fortunately, the fix is quite simple: patch vim-solarized-colors to abide by &termguicolors where appropriate. You can find the patch in this commit on my fork of the addon. Incidentally, that fork contains some other patches that you may find useful. Feel free to point to it in your Vim config or apply the patches to your own version as you like.






    share|improve this answer




























      0














      Every color scheme defines terminal colors separately from GUI colors. Traditionally, terminals supported at most 256 colors, and they mostly use a palette of 16 colors. GUIs commonly support 24-bit colors, so Vim (and Neovim) provide separate highlighting settings for color scheme authors.



      Nowadays, many modern terminals support 24-bit colors as well. However, even when running in such a terminal, Neovim normally uses the terminal colors scheme and the 256-color rendering methods. This setting



      set termguicolors


      causes Neovim to render 24-bit colors, using the GUI color scheme settings. However, this does not cause Neovim to pretend that it is actually running in a GUI—that is, has('gui_running') is correctly still false.



      Unfortunately, due to the historic conflation of GUI mode with 24-bit color mode, you may find that some addons do not handle termguicolors correctly. Your situation is such a scenario. The current implementation of vim-solarized-colors uses has('gui_running') to set the correct colors for 24-bit color mode, so it ends up setting an odd mish-mash of wrong values when Neovim uses 24-bit colors but is not running in a GUI.



      Fortunately, the fix is quite simple: patch vim-solarized-colors to abide by &termguicolors where appropriate. You can find the patch in this commit on my fork of the addon. Incidentally, that fork contains some other patches that you may find useful. Feel free to point to it in your Vim config or apply the patches to your own version as you like.






      share|improve this answer


























        0












        0








        0







        Every color scheme defines terminal colors separately from GUI colors. Traditionally, terminals supported at most 256 colors, and they mostly use a palette of 16 colors. GUIs commonly support 24-bit colors, so Vim (and Neovim) provide separate highlighting settings for color scheme authors.



        Nowadays, many modern terminals support 24-bit colors as well. However, even when running in such a terminal, Neovim normally uses the terminal colors scheme and the 256-color rendering methods. This setting



        set termguicolors


        causes Neovim to render 24-bit colors, using the GUI color scheme settings. However, this does not cause Neovim to pretend that it is actually running in a GUI—that is, has('gui_running') is correctly still false.



        Unfortunately, due to the historic conflation of GUI mode with 24-bit color mode, you may find that some addons do not handle termguicolors correctly. Your situation is such a scenario. The current implementation of vim-solarized-colors uses has('gui_running') to set the correct colors for 24-bit color mode, so it ends up setting an odd mish-mash of wrong values when Neovim uses 24-bit colors but is not running in a GUI.



        Fortunately, the fix is quite simple: patch vim-solarized-colors to abide by &termguicolors where appropriate. You can find the patch in this commit on my fork of the addon. Incidentally, that fork contains some other patches that you may find useful. Feel free to point to it in your Vim config or apply the patches to your own version as you like.






        share|improve this answer













        Every color scheme defines terminal colors separately from GUI colors. Traditionally, terminals supported at most 256 colors, and they mostly use a palette of 16 colors. GUIs commonly support 24-bit colors, so Vim (and Neovim) provide separate highlighting settings for color scheme authors.



        Nowadays, many modern terminals support 24-bit colors as well. However, even when running in such a terminal, Neovim normally uses the terminal colors scheme and the 256-color rendering methods. This setting



        set termguicolors


        causes Neovim to render 24-bit colors, using the GUI color scheme settings. However, this does not cause Neovim to pretend that it is actually running in a GUI—that is, has('gui_running') is correctly still false.



        Unfortunately, due to the historic conflation of GUI mode with 24-bit color mode, you may find that some addons do not handle termguicolors correctly. Your situation is such a scenario. The current implementation of vim-solarized-colors uses has('gui_running') to set the correct colors for 24-bit color mode, so it ends up setting an odd mish-mash of wrong values when Neovim uses 24-bit colors but is not running in a GUI.



        Fortunately, the fix is quite simple: patch vim-solarized-colors to abide by &termguicolors where appropriate. You can find the patch in this commit on my fork of the addon. Incidentally, that fork contains some other patches that you may find useful. Feel free to point to it in your Vim config or apply the patches to your own version as you like.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '17 at 16:01









        nisavidnisavid

        11 bronze badge




        11 bronze badge






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f336670%2fcannot-get-color-schemes-to-display-correctly-in-neovim%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

            The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

            Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...