yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.34k stars 30 forks source link

Different selection colors in fvim #82

Closed Kethku closed 5 years ago

Kethku commented 5 years ago

In nvim qt and terminal nvim, selection colors are set by the color scheme.

image

In fvim however they appear to be default or something similar

image

yatli commented 5 years ago

Noted.

Looks like a reverse color calculation error.

Kethku commented 5 years ago

Actually I think neovim doesn't use reverse colors to highlight. As you can see the background for the highlight changes based on the thing highlighted. Maybe I'm misunderstanding your comment, but I believe highlighting in vim is more complicated than a reverse color calculation.

yatli commented 5 years ago

@Kethku looking at your screenshot I believe what nvim-qt does is to simply swap fg and bg.

Note that in your screenshot the foreground color stays the same (which appears to be the default bg).

This is different from what I understand from the highlight color docs, but if this is the de facto behavior we can implement that.

edit: for clarity, it depends on the color scheme whether highlight is done by color reversing, or a new highlight group. gruvbox uses reverse colors.

yatli commented 5 years ago

the reverse color calculation is really off.. see 48b42e8014fcc77f9b2ab88da056dc6cd075c5ba

yatli commented 5 years ago

hmm, looks like nvim-gtk also implement the swapping scheme. edit:

reverse:        reverse video. Foreground and background colors are
            switched.

looks like I have misunderstood the docs. The other frontends are implementing it correctly!

yatli commented 5 years ago

pushed out a new release (0.2-132)

Kethku commented 5 years ago

I don't think this is the correct fix. It appears that gruvbox itself is manually setting the selection colors. See this issue: https://github.com/morhetz/gruvbox/issues/167

Kethku commented 5 years ago

Also note: in a compatible terminal, the colors do the same thing which says to me either the docs or wrong since they don't match the reference implementation or maybe the docs are just confusing

Kethku commented 5 years ago

I will try to spend some time to find more information. Thank you for your effort

yatli commented 5 years ago

with let g:gruvbox_invert_selection=0 before setting the colorscheme:

image

check your settings :)

Kethku commented 5 years ago

Fair, but given the change between fvim and terminal nvim/nvimqt, doesn't this constitute a bug?

yatli commented 5 years ago

the behavior should be identical to other frontends, could you please confirm?

Kethku commented 5 years ago

Yes I will. Thanks

Thanks, Keith


From: Yatao Li notifications@github.com Sent: Saturday, October 5, 2019 9:24:53 AM To: yatli/fvim fvim@noreply.github.com Cc: Keith Simmons keith@the-simmons.net; Mention mention@noreply.github.com Subject: Re: [yatli/fvim] Different selection colors in fvim (#82)

the behavior should be identical to other frontends, could you please confirm?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/yatli/fvim/issues/82?email_source=notifications&email_token=AAZLN3YZLV5AXVYHLM35H3TQNC5VLA5CNFSM4I4ESAS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANV7AA#issuecomment-538664832, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAZLN36NYN4K6DOQUQLHE33QNC5VLANCNFSM4I4ESASQ.

Kethku commented 5 years ago

Looks like I missed your https://github.com/yatli/fvim/issues/82#issuecomment-538658098 comment! This is working perfectly now. Thank you so much!