neovim-qt: Problem with GuiFont and NerdFonts and Powerline
OS: ArchLinux
Version: git master
Fonts: https://github.com/ryanoasis/nerd-fonts and PowerlineFonts
ginit.vim: Guifont MesloLGLDZ NF RegularForPowerline:h13
Error: Unknown font: MesloLGLDZ NF RegularForPowerline
How to set Powerline fonts or NerdFonts? On Gnome-Terminal fonts works.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 45 (18 by maintainers)
If its throwing that error it is because the font metrics don’t seem to be monospace. Sometimes this happens because the fonts are buggy, but there are other valid reasons for this depending on your system.
Add a bang, use
GuiFont! ...
@kierun try
fc-list | grep Inconsolata
and get the font name, example:/home/***/.fonts/Fura Mono Medium for Powerline Nerd Font Complete.otf: FuraMonoForPowerline Nerd Font:style=Medium
Guifont FuraMonoForPowerline Nerd Font:h9
but how to set the font? i typed
and get
Lots of fonts, not entirely sure what is the right variation you wanted. I used this one
The name for this one is
Meslo LG L DZ for Powerline
. TheRegular
in the name is just the font style but it is usually not part of the font name. A good way to find this in linux systems to callfc-list
it should show all the font files in your system, followed by their name and some more attributes.Another problem… I am getting a lot of
Font X is not a fixed pitched font
error when setting some fonts. Now, those fonts do havemono
in their names, so I’d assume they would be fixed pitch. Any idea how to find which fonts are fixed pitched or whether I can tell neovim-qt to use not-fixed-pitched fonts?@jdhao neovim currently does not support this, but the option would be guioptions (which already existed in vim). This has been discussed a couple of times but I dont think there is an open issue for it.
Going back to the original issue. nvim-qt should show a message for errors in ginit.vim, for example like the following invalid command. If that is not the case we can open a new issue for this.
Do you have true color enabled in both nvim-qt and gvim? I am using lightline (not powerline | airline).
I just tried that font and it renders correctly for me. Besides it is beautiful 😄
@joe23rep It should be in
ginit.vim
, something like: