jeanguyomarch / eovim

The Enlightened Neovim
https://github.com/jeanguyomarch/eovim/wiki
MIT License
192 stars 3 forks source link

Unable to set guifont as normal #69

Open shanoaice opened 2 years ago

shanoaice commented 2 years ago
Version: 0.2.0.99-3282ed1

Build Type: Release

Compiled with EFL 1.25.1
Compiled with msgpack 3.3.0
Linked with EFL 1.25.1
Linked with msgpack 3.3.0

Neovim (program: 'nvim') version:

NVIM v0.6.0-dev+91-gd628e4250
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-git/src/build/config -I/build/neovim-git/src/neovim-git/src -I/usr/include -I/build/neovim-git/src/build/src/nvim/auto -I/build/neovim-git/src/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Starting eovim within the terminal will give a lot of error:

ERR<15654>:eovim /home/shanoa/build/aur/eovim-git/src/eovim-git/src/event/option_set.c:89 _guifont_set() invalid guifont='FiraCode Nerd Font:h12'. Expected: Fontname-Fontsize[:extra]'
ERR<15654>:eovim /home/shanoa/build/aur/eovim-git/src/eovim-git/src/event/option_set.c:242 nvim_event_option_set() Failed to process option with keyword 'guifont'
ERR<15654>:eovim /home/shanoa/build/aur/eovim-git/src/eovim-git/src/nvim_helper.c:82 parse_theme_config_animation_style() Invalid parameter for cursor duration. Using linear as a default.
CRI<15654>:eovim /home/shanoa/build/aur/eovim-git/src/eovim-git/src/nvim_event.c:152 nvim_event_tabline_update() Invalid argument count. (4 == 2) is false

And the most important problem is the one with _guifont_set(). This worked very well in other Neovim GUIs, and I'm sure I've installed Fira Code Nerd Font on my computer. Manually running 'set guifont=' in the command line won't work either.

Also, the external tabline seemed not to work too, as it will produce a cascade of error and extend the whole window to an awkward length.

If I try to run eovim from the DE's startup menu, it will give this error and exit immediately: image Disabling the external tabline feature won't work either.

jeanguyomarch commented 2 years ago

Hi, thanks for the report. I think that these two issues are not correlated.

About the issue you are having with guifont

The error message states:

invalid guifont='FiraCode Nerd Font:h12'. Expected: Fontname-Fontsize[:extra]'

which means your guifont parameter is unexpected. This is detailed in the wiki page: Changing the Font. Note that (neo)vim does not specify guifont's format (as per :help guifont), so there is no guarantee that this parameter is handled similarly across various frontends. The weird format is because eovim completely rely on fontconfig. See here how you to write vim configuration that is specific to eovim.

So, you probably would like to write something like:

if exists("g:eovim_running")
  set guifont=FiraCode\ Nerd\ Font-12
endif

About the tabline issue

This seems to be caused by recent versions of neovim (>= 0.4). Tabline is indeed broken, probably since nvim 0.5.0, and requires fixing.

jeanguyomarch commented 2 years ago

Oops,GitHub automatically closed the issue... this was not intended.