liuchengxu / space-vim-theme

:blossom: A dark and light colorscheme for space-vim that supports GUI & terminal
161 stars 26 forks source link

VimCurrentWord highlight group does not take effect #1

Closed hongyuanjia closed 5 years ago

hongyuanjia commented 5 years ago

Thanks for this amazing-looking color scheme!

I am using space-vim with space-vim-theme color scheme enabled by default in the latest version.

I found that CurrentWord highlight group is somehow linked to Search, which makes it extremely to find the cursor as it uses reverse effect. See pic below:

image

However, space-vim-dark does not have this issue:

image

In space_vim_theme.vim, you define a new color group called VimCurrentWord which is not the one that vim_current_word plugin uses. I believe this is where the issue comes from.

https://github.com/liuchengxu/space-vim-theme/blob/9c74b24ccd57738efcd64fb583a0fed648b0f506/colors/space_vim_theme.vim#L277

Any insights? Thanks!

liuchengxu commented 5 years ago

Thanks for the report. Please pull and try the latest version.

hongyuanjia commented 5 years ago

Unfortunately, it does not work on my side.

But if I put lines below in UserConfig(), the issue goes away...

  hi CurrentWord ctermfg=NONE ctermbg=60 guifg=NONE guibg=#544a65 guisp=NONE cterm=NONE,underline gui=NONE,underline
  hi CurrentWordTwins ctermfg=NONE ctermbg=60 guifg=NONE guibg=#544a65 guisp=NONE cterm=NONE gui=NONE

Any thoughts?

liuchengxu commented 5 years ago

Can you ensure you have pulled the latest version? In the latest commit:

:hi CurrentWord
CurrentWord    xxx cterm=underline ctermbg=60 gui=underline guibg=#544a65

To highlight manually is definitely doable. You can customize any colors after you load a colorscheme.

hongyuanjia commented 5 years ago

Yes, I am pretty sure I pulled the latest version. Those two lines are copied from space_vim_theme.vim on my local machine.

image

CurrentWord is still linked to Search on my side. I have no idea what is going on...

liuchengxu commented 5 years ago

What does :verbose hi CurrentWord say?

hongyuanjia commented 5 years ago

Did not know how to pipe the message into vim's register. Anyway, here is the message:

image

It points to line 42:

hi! link CursorColumn CursorLine
liuchengxu commented 5 years ago

That makes sense. The plugins vim_current_word overrides the colors from space-vim-theme.

You can use :redir to capture the message of an ex command to register, refer to http://vim.wikia.com/wiki/Capture_ex_command_output for more details.

liuchengxu commented 5 years ago

I don't know why your vim_current_word still defines its group, but you have found the quickest solution anyway. What's more, I use https://github.com/neoclide/coc-highlight now.

hongyuanjia commented 5 years ago

That makes sense. The plugins vim_current_word overrides the colors from space-vim-theme.

You can use :redir to capture the message of an ex command to register, refer to http://vim.wikia.com/wiki/Capture_ex_command_output for more details.

Thanks for the nice trick!

I don't know why your vim_current_word still defines its group, but you have found the quickest solution anyway. What's more, I use https://github.com/neoclide/coc-highlight now.

Never mind, since manual setting works as expected.

Thanks again for your space-vim distro and all related works!