Nvim-qt is one of the many GUI front end for Neovim and it is packaged with Neovim by default on Windows platform. In this post, I will give a summary on how to solve a few issues with Nvim-qt.

How do I pass options to neovim

Since nvim-qt has its own options, it will get confused if you simply provide it with nvim options. You need to specify nvim options after --. For example, to open a file using specific configuration file, use the following command:

nvim-qt some_file.txt -- -u init.vim

Where should I put ginit.vim?

Nvim-qt config file is called ginit.vim and you should put it under the same directory where nvim configuration file is. The directory is something like C:\Users\Administrator\AppData\Local\nvim.

GUI settings

How to turn off the GUI tabline?

The GUI tabline of in nvim-qt is ugly. We can use GuiTabline 0 inside ginit.vim to disable GUI tabline.

How to turn off GUI completion menu

The GUI completion menu is also ugly and too long, since it shows the detailed docstrings of object methods.

You can disable it by using the following setting in ginit.vim:

GuiPopupmenu 0

How to reduce line space?

Use GuiLinespace to control the line space in nvim-qt, for example, GuiLinespace 1.

How to change the font used?

You can change the font Nvim-qt use by default. To check the default font used, use GuiFont command inside nvim-qt without argument. On my system, the output is Consolas:h11.

According to nvim-qt documentation, the following attributes for font are available:

hXX - height is XX in points
b   - bold weight
l   - light weight
i   - italic

You can chain different attribute with : character. For example, to use Hack in 10 point and light weight, use the following command:

:GuiFont Hack:h10:l

After issuing the above command, you may see the following warning message:

Warning: Font “Hack” reports bad fixed pitch metrics.

To suppress this message, use the bang version of GuiFont command:

:GuiFont! Hack:h10:l

How to open nvim-qt with maximized window?

Add the following settings to your ginit.vim file:

call GuiWindowMaximized(1)