daa84 / neovim-gtk

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

Ligatures are not shown #143

Closed mcepl closed 5 years ago

mcepl commented 6 years ago

Describe the bug Screenshot of the issue

So, I have set Fira Code as guifont (why nvim-gtk just doesn't honour that and forces me to do the silly things with ~/.config/nvim/ginit.vim ;and is nvim or nvim-gtk?), I have this in my ~/.config/nvim/ginit.vim (according to wiki):

if exists('g:GtkGuiLoaded')
    call rpcnotify(1, 'Gui', 'Font', 'Fira Code Medium 11')
endif

I have even set Fira Code as a system-wide font:

matej@milic: ~$ gsettings get org.gnome.desktop.interface monospace-font-name
'Fira Code Medium 11'
matej@milic: ~$

And still, there are no ligatures shown in my nvim-gtk. And frankly, ligatures are the only feature I miss from the in-console-neovim.

(The same happens with Iosevka font, just in case there would be doubt about the font itself).

Technical information (please complete the following information):

SolidTux commented 6 years ago

I also don't see ligatures with both Hasklig and Fira Code under Windows.

daa84 commented 6 years ago

I don't know why, but ligatures does not work on windows with msys, even on gedit. On linux for me it just works without any special settings

saumyajyoti commented 6 years ago

Ligatures did no work for me either on Windows with Fira Code and Iosevka.

mcepl commented 6 years ago

On the same computer, ligatures in gedit work (Fira Code), with neovim-gtk they don't.

mcepl commented 5 years ago

With my new build on https://build.opensuse.org/package/show/home:mcepl:neovim/neovim-gtk everything suddenly works. No idea, what has changed.

mcepl commented 5 years ago

snimek z 2018-11-16 21-04-22

OK, so it is definitively weird. In one tab (with SPEC file for Linux RPM package) ligatures don't work (the result is the same as in the screenshot in the original description of this issue), whereas in the other tab with a Python file it does (ligatures ->, >= and ==).

daa84 commented 5 years ago

This is because ligatures can not be rendered partly. When color of left side and right side is different. So in this case ligatures became just symbols

mcepl commented 5 years ago

OK, so this is NOTABUG. Thank you.

mcepl commented 5 years ago

@daa84 So, would you say that this is a bug in syntax definition for SPEC files?

daa84 commented 5 years ago

Don't think this is bug, it just not work with ligatures :) I don't have idea why to draw on symbol with different color. Event if it possible with some special combination of layer merge operation, think it will look strange.