junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.52k stars 118 forks source link

NonText highlight group reset when entering Goyo #232

Open noib3 opened 4 years ago

noib3 commented 4 years ago

Goyo seems to ignore the color of the NonText highlight group set by the current colorscheme as it gets set to black upon entering.

This is the output of :hi NonText before and after entering Goyo:

before 2020-08-11@15:48:49

after 2020-08-11@15:49:28

scbrickley commented 3 years ago

Also experiencing this. Can confirm that it does the same thing for Search, IncSearch, and other highlight groups.

scbrickley commented 3 years ago

Although, for me, the change happens after entering and then exiting Goyo mode.

leogama commented 3 years ago

I'm having exactly this problem. It seems to be the same issue as https://github.com/junegunn/goyo.vim/issues/84#issuecomment-156299446. It's a problem related to colorscheme loading, not specific to Goyo thought…

noib3 commented 3 years ago

@leogama I'm not sure it's the same issue as https://github.com/junegunn/goyo.vim/issues/84#issuecomment-156299446. That issue is about Goyo not restoring some highlight groups on exit and can easily be fixed with a few autocommands. This one is about on entry behaviour and is not as easily fixable.

pocco81 commented 3 years ago

Unrelated to Goyo itself, but I fixed this problem by giving users the avality to mange which hi groups are affected. The issue on my repo was referenced here, so thought I'd share: https://github.com/Pocco81/TrueZen.nvim/issues/28