daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
718 stars 56 forks source link

Completion Popup Menu does not hilite current selection #45

Closed Dasmark closed 6 years ago

Dasmark commented 6 years ago

In regular neovim, when the popup completion menu appears, the selected entry is hilited according to PmenuSel. I understand that this probably cannot be done with neovim-gtk, but currently there is no hilite or frame or whatsoever at all, which makes it impossible to navigate the completion list.

daa84 commented 6 years ago

Currently highlight is exists and works for me. But it implemented as some css style change inside application, maybe this does not work for some themes... can't say.

Dasmark commented 6 years ago

Doesn't work for none of the vim themes. Or do you mean GTK-themes?

daa84 commented 6 years ago

Yes, I mean gtk theme

Dasmark commented 6 years ago

So I tried 5 different GTK themes and for none of them hiliting worked. Interestingly, the background-color of the popup gets styled according to the vim colorscheme and not to the GTK-theme. Which GTK-theme do you use where this works for?

daa84 commented 6 years ago

I use ubuntu default theme. Currently style for selected item looks like this

.view {color: {}; background-color: {};}

maybe something wrong with this... code is here https://github.com/daa84/neovim-gtk/blob/3985f215cef2759cde7f323c25ad61f182b3c28c/src/popup_menu.rs#L172

Dasmark commented 6 years ago

If I comment out that whole gtk::CssProviderExt::load_from_data() block, the selected popup entry get hilited according to the system GTK theme. If I replace bg.to_hex() with "red" it gets a red background. So I'm assuming, that https://github.com/daa84/neovim-gtk/blob/3985f215cef2759cde7f323c25ad61f182b3c28c/src/popup_menu.rs#L166-L167

is not reading the colorscheme properly.

daa84 commented 6 years ago

what version of neovim do you use? is it > 0.2.1? Is there some error messages in console when you start application or change colorscheme in neovim?

Dasmark commented 6 years ago

Currently using 0.2.1

If I dump bg and fg I get the explicit values for the regular fg and bg, not the PMenu ones

Dasmark commented 6 years ago

Okay, compiled 0.2.2 manually and it works. Sorry for bothering you :o(