Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disappearing colors on resourcing vimrc in neovim #144

Closed
nhooyr opened this issue Jan 21, 2016 · 23 comments
Closed

disappearing colors on resourcing vimrc in neovim #144

nhooyr opened this issue Jan 21, 2016 · 23 comments
Labels

Comments

@nhooyr
Copy link
Contributor

nhooyr commented Jan 21, 2016

In neovim terminals this happens sometimes only in 'terminal' or 'insert' mode.

screen shot 2016-01-21 at 12 46 34 am

Here it is in the same buffer but in normal mode.

screen shot 2016-01-21 at 12 46 39 am

No clue what's wrong.

@itchyny
Copy link
Owner

itchyny commented Jan 21, 2016

I cannot reproduce the bug with the following step.
Save the following file as .nvimrc.test

set nocompatible
filetype off
set rtp+=/path/to/lightline.vim
filetype plugin indent on
set laststatus=2

Open neovim with nvim -u .nvimrc.test
Go to insert mode or execute :terminal.

@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 21, 2016

I'll try figuring out how to reproduce it. I'm not sure right now.

@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 22, 2016

@itchyny figured it out. It has to do with sourcing vimrc again.

https://www.youtube.com/watch?v=y2H0-5H7JVo&feature=youtu.be

I also tested with default vim-airline and it doesn't seem to affect them.

@itchyny
Copy link
Owner

itchyny commented Jan 22, 2016

Please paste the minimal vimrc (which is under 20 lines at most) to reproduce the bug. Otherwise I cannot investigate the reason what causes the bug or even I do not know this is a bug of lightline or of other plugin or of Vim itself.

@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 22, 2016

@itchyny were you able to watch the video?

I'll post a vimrc soon just give me a few.

@itchyny
Copy link
Owner

itchyny commented Jan 23, 2016

Yes but I found no clue to reproduce. I close this issue because the issue report is less informative.

@itchyny itchyny closed this as completed Jan 23, 2016
@itchyny itchyny reopened this Jan 23, 2016
@itchyny itchyny closed this as completed Jan 23, 2016
@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 23, 2016

@itchyny sorry I didn't post the vimrc but did you watch the video?

@itchyny
Copy link
Owner

itchyny commented Jan 23, 2016

Yes

@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 23, 2016

@itchyny

filetype off
set rtp+=/usr/local/etc/dotfiles/nvim/plugged/lightline.vim
set rtp+=/usr/local/etc/dotfiles/nvim/plugged/Apprentice
filetype plugin indent on
set laststatus=2
colorscheme apprentice

It only happens if a colorscheme is set (I tried apprentice and solarized etc.)

Steps to reproduce

  1. Open neovim with the above as init.vim or use the -u option
  2. Open a terminal with :term
  3. Now type <c-> to leave terminal mode and then source the init.vim file with :source pathtoinit.vim
  4. Now reenter terminal mode by pressing i. Bam the colours should disappear.

@itchyny
Copy link
Owner

itchyny commented Jan 24, 2016

I still cannot reproduce because I don't see what init.vim is.

@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 24, 2016

@itchyny in neovim, the ~/.vimrc is called init.vim and its under $XDG_CONFIG_HOME/nvim/init.vim. This is a neovim problem.

@itchyny
Copy link
Owner

itchyny commented Jan 24, 2016

I still cannot reproduce with the following steps.

 $ cat > ./vimrc
filetype off
set rtp+=/path/to/lightline.vim
set rtp+=/path/to/Apprentice
filetype plugin indent on
set laststatus=2
colorscheme apprentice
^D
 $ nvim -u ./vimrc<CR>
:terminal<CR>
^D<CR>
:so ./vimrc<CR>
:terminal<CR>

Am I doing incorrectly?

@itchyny
Copy link
Owner

itchyny commented Jan 24, 2016

Ah, OK. It seems to be appeared on my environment.

@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 24, 2016

great. hopefully you can figure out whats going on.

@itchyny itchyny changed the title disappearing colors disappearing colors on resourcing vimrc in neovim Jan 25, 2016
@nhooyr
Copy link
Contributor Author

nhooyr commented Jan 28, 2016

@itchyny forgot to reopen the issue, its still closed even though you could reproduce it.

@nhooyr
Copy link
Contributor Author

nhooyr commented Feb 9, 2016

@itchyny any updates on this? its still closed even though you managed to reproduce.

@itchyny
Copy link
Owner

itchyny commented Feb 9, 2016

I don't want be bothered by the behaviour which occurs only in neovim, the editor which has different architecture of rendering compared to Vim.

@itchyny itchyny added the wontfix label Feb 9, 2016
@nhooyr
Copy link
Contributor Author

nhooyr commented Feb 9, 2016

@itchyny in that case i'll take a stab and see if I can fix it.

@nhooyr
Copy link
Contributor Author

nhooyr commented Feb 9, 2016

@itchyny it has to do with running hi clear in the colorscheme file. This resets the highlighting groups. For some reason lightline then doesn't then reset the terminal highlight groups. Do you know exactly how to fix this?

@nhooyr
Copy link
Contributor Author

nhooyr commented Feb 9, 2016

I fixed it, i'll create a PR

@Billy-
Copy link

Billy- commented Mar 21, 2019

I'm having this issue on Vim 8 on OSX. Is it related? I saw that the PR changed a block that was in has('win32'), so could this fix be applied for osx, too?

@itchyny
Copy link
Owner

itchyny commented Mar 26, 2019

@Billy- Please create a new issue if there's some trouble with environment info, precise steps expected behavior and minimal vimrc if possible.

@Billy-
Copy link

Billy- commented Mar 26, 2019

I hope I'll be able to find the spare time to do that..

YCbCr pushed a commit to YCbCr/lightline.vim that referenced this issue May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants