rafi / vim-config

Lean mean Neovim machine, carefully crafted with :heart: Use with latest Neovim.
1.89k stars 467 forks source link

Theme Not Initialising Correctly #212

Closed thecontinium closed 3 years ago

thecontinium commented 3 years ago

After the latest changes there is no cursor highlight showing for fern. I am using the default colour scheme of hybrid.

:colorsheme hybrid fixes this.

thecontinium commented 3 years ago

When nvim is opened the UserSelectionBackground is not set

:highlight UserSelectionBackground
UserSelectionBackground xxx cleared

so on setting the CursorLine to this in fern_init we get no background for the cursor line.

@rafi are you seeing this or is it just my setup ?

cheers

thecontinium commented 3 years ago

Adding this to my local.vim was the only way I found to set the state correctly at startup.

autocmd VimEnter * source /Users/thecontinium/.config/nvim/themes/hybrid.vim

thecontinium commented 3 years ago

The problem is that syntax enable clears all the highlights so the auto command at the end of

config/init/dein#load_state(l:cache_path)

autocmd user_events VimEnter *
  \ filetype plugin indent on
  \| syntax enable

clears highlights setup by the theme.

syntax enable needs to be before any colour schemes/themes are initialised.

An option is to change it to this, which fixes this problem:

filetype plugin indent on
syntax enable
mm1ke commented 3 years ago

I can confirm this issue. I have the exact same problem and the change in the init.vim fixed it for me (thx @thecontinium )

ialiendeg commented 3 years ago

I can also confirm the issue and the fix (thx @thecontinium )

rafi commented 3 years ago

I have been ill but better now :) Thanks @thecontinium, disabled the autocmd

thecontinium commented 3 years ago

Good you are feeling better. Cheers