Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set guifont as normal #69

Open
shanoaice opened this issue Jul 31, 2021 · 2 comments
Open

Unable to set guifont as normal #69

shanoaice opened this issue Jul 31, 2021 · 2 comments

Comments

@shanoaice
Copy link

  • eovim --version:
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
Copy link
Owner

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 pushed a commit that referenced this issue Jul 31, 2021
We expected the tabline messages to be arrays of two elements. Neovim
0.5.0 added more arguments. We currently don't do anything with them,
but at least the tabline is fixed, for now.

Partially fixes #69
@jeanguyomarch
Copy link
Owner

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

@jeanguyomarch jeanguyomarch reopened this Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants