neovide / neovide

No Nonsense Neovim Client in Rust
https://neovide.dev
MIT License
12.74k stars 515 forks source link

under line be only red #300

Closed findNextStep closed 3 years ago

findNextStep commented 4 years ago

I add setting make every member function and var with underline and the underline only show as red image I set underline like

highlight LspCxxHlSymClassMethod gui=underline guifg=#e5b124

It show in terminal like image

j4qfrost commented 4 years ago

I'm having some trouble understanding your issue. Is your problem that you want both colors to appear but for different cases or is one color showing when another should be?

findNextStep commented 4 years ago

I think the underline color set by gui=underlineshould be same as the font color

j4qfrost commented 4 years ago

Have you tried changing other settings? It could be applying the wrong configuration file. Also maybe try changing the color to #ffffff just to check and see that it's not some weird rendering issue.

findNextStep commented 4 years ago

it seem that it just happen

image by the way i work on mac, compile with master branch

j4qfrost commented 4 years ago

I've found the cause of the behavior discrepancy. It looks like the behavior for neovim is to make it so underline would always be the foreground color, but neovide handles this with a "special" color which is set to red. I am a beginner with vim, so I'm not sure how to configure the special value. This looks like a design decision by @Kethku, so I would sit tight for a response from him.

I think it's a fairly nice feature to be able to change the color like this for the underlines to pop, but it's not in line with nvim design. Thanks for pointing it out, @findNextStep

Kethku commented 4 years ago

actually this is to spec. Neovim guis have the ability to set the underline color where terminals cannot. The special color is sent by neovim for this exact case.

You can change the underline or undercurl color by setting guisp for a given style

j4qfrost commented 4 years ago

Should guisp default to foreground instead of red then?

Kethku commented 4 years ago

That's an interesting point and I'm not sure. I'm sorta incline to look up what other guis do and emulate with the exception of neovim-qt which does it wrong

Thanks, Keith


From: j4qfrost notifications@github.com Sent: Wednesday, May 27, 2020 9:32:13 AM To: Kethku/neovide neovide@noreply.github.com Cc: Keith Simmons keith@the-simmons.net; State change state_change@noreply.github.com Subject: Re: [Kethku/neovide] under line be only red (#300)

Should guisp default to foreground instead of red then?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/Kethku/neovide/issues/300#issuecomment-634784691, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAZLN356E5Q3MY6RBONTTRLRTU6A3ANCNFSM4NL3EKUQ.

j4qfrost commented 4 years ago

I like how it is now. I think this is more a feature than anything else. We could include a link to some vim configuration samples on the README. It would be a good way to explore quirks.

svermeulen commented 4 years ago

Why is nvim-qt wrong for using the foreground color for guisp?

svermeulen commented 4 years ago

I'm not sure what is technically correct according to nvim spec, but I definitely prefer foreground color for this. I think hard coding it to red will not look right in certain color schemes

Kethku commented 4 years ago

nvim-qt doesn't pay attention to guisp (at least when I looked last) so its incorrect in the sense that it doesn't pay attention to the special color at all.

note that we don't hard code the underline to red. It is given to us by the style from the neovim process.

Kethku commented 4 years ago

In fact we default to grey not red. Vim is setting the special color to red not us. https://github.com/Kethku/neovide/blob/master/src/editor/mod.rs#L56

last-partizan commented 3 years ago

I'm gonna reopen this issue, and dig a little further.

https://github.com/neovide/neovide/blob/d2760e2d4562c4d7793444120be386d79bcdf57f/src/editor/style.rs#L57

Here is we're setting color for special, by using special color or default special.

I think, if we change this chain to special or foreground or default special, nobody will complain and i will be happy.

I'll make a PR with this change.

Look at this:

old

image

fixed

image

This change still allows underline color to be customized, but default will be expected color and not red.