Configuration Options - equalsraf/neovim-qt GitHub Wiki

Neovim Qt Configuration Options

This page describes all of the configuration options supported by NeovimQt.
Scroll down to see the list of options available, along with images and examples.

QSettings config

Location

  • For linux/mac
~/.config/nvim-qt/nvim-qt.conf
  • For Windows
    Windows QSettings is in Windows registry
HKEY_CURRENT_USER\Software\nvim-qt\nvim-qt

Possible options

  • ext_tabline
  • ext_popupmenu
  • ext_linegrid

Common Configuration Options:

Generic Vim Options

These options can be set anywhere, and do not require the Neovim Qt runtime. You can set these options from init.vim.

guicursor

guifont

guifontwide

linespace

NeovimQt Specific Options

These options are specific to Neovim Qt. The options cannot be set from init.vim, they must be set from ginit.vim.

These options require the Neovim Qt Runtime.

You can experiment with these options in the commandline of any NeovimQt session.

GuiAdaptiveColor

Adjusts the GUI to use the Neovim colorscheme.

Adaptive color does not work on all platforms and widget styles.

If you experience issues, try :GuiAdaptiveStyle Fusion.

:GuiAdaptiveColor 0 (Default):
GuiAdaptiveColor 0

:GuiAdaptiveColor 1:
GuiAdaptiveColor 1

GuiAdaptiveFont

Adjusts the GUI to use the same font as the Neovim shell font.

Adaptive color does not work on all platforms and widget styles.

If you experience issues, try :GuiAdaptiveStyle Fusion.

:GuiAdaptiveFont 0 (Default):
GuiAdaptiveFont 0

:GuiAdaptiveFont 1:
GuiAdaptiveFont 1

Adaptive font does not work on all platforms and UI styles.

GuiAdaptiveStyle

Changes the UI widget style of Neovim Qt. This is especially useful on Windows/MacOS, where some elements of the native styles are not adaptive.

You can list all styles available with :GuiAdaptiveStyleList. The style Fusion is usually available on all platforms.

To revert to the default style, call :GuiAdaptiveStyle with no arguments.

:GuiAdaptiveStyle (Default):
GuiAdaptiveStyle 0

:GuiAdaptiveStyle Fusion:
GuiAdaptiveStyle 1

GuiFont

Change the font used by Neovim Qt.

A GUI font dialog is available to aid font selection, call :GuiFont *.

You may see these errors:

  • {Font Name} is not a fixed pitch Font
  • Warning: Font {Font Name} reports bad fixed pitch metrics

You can override this warning with :GuiFont! {Font Name}.

The following attributes are available:

hXX - height is XX in points (can be floating-point)
wXX - weight is XX
b   - bold weight
sb  - semibold weight
l   - light weight
i   - italic

To view the active font, call :GuiFont with no arguments.

GuiLinespace

Adds additional space between rows of text in NeovimQt.

Specify the number of pixels to be added between rows.

:GuiLinespace 10:
GuiLineSpace 10 k

Any integer value greater than 0 is valid. You can view the current value by calling :GuiLinespace with no arguments.

This setting can also be configured in init.vim via :set linespace=....

GuiPopupmenu

Enables the Neovim GUI Popupmenu feature, ext_popupmenu. Renders the completion menu in Qt, instead of within the Neovim terminal UI.

This feature can be disabled with :GuiPopupmenu 0.

GuiRenderLigatures

Modifies the rendering logic to support font ligatures.

By default, text is rendered character-by-character on the grid.

With the option enabled, text is rendered line-by-line, enabling ligatures spanning multi-characters.

This option may also alleviate text-clipping on some italic fonts. See Issue 154.

:GuiRenderLigatures 0 (Default):
GuiRenderLigatures 0

:GuiRenderLigatures 1:
GuiRenderLigatures 1

GuiScrollBar

Renders an GUI scrollbar attached to the active buffer.

:GuiScrollBar 0 (Default):
GuiScrollBar 0

:GuiScrollBar 1:
GuiScrollBar 1

GuiTabline

Enables the Neovim GUI Tabline feature, ext_tabline. Renders Vim Tabs in Qt, instead of within the Neovim terminal UI.

This feature can be disabled with :GuiTabline 0.

Note, this feature renders tabs, and not buffers. The standard concept of an editor tab is similar to a Vim "buffer", and a Vim "tab" is more similar to a saved view.

GuiWindowOpacity

" ../ginit.vim
GuiWindowOpacity 0.9

Other

GuiClipboard

See also Neovim Provider#Clipboard
Warning This feature is experimental. See related Issue: #298..

Usage:

" ginit.vim
if exists(':GuiClipboard')
  call GuiClipboard()
endif

GuiAdaptiveStyleList

GuiDrop

GuiForeground

GuiLoaded

GuiMousehide

GuiShowContextMenu

GuiTreeviewHide

GuiTreeviewShow

GuiTreeviewToggle

GuiWindowFullScreen

GuiWindowMaximized

Advanced Startup Configuration

Several options can be set immediately on startup. These settings will take effect even before ginit.vim is loaded. This is useful for options like ext_linegrid, or to prevent GuiTabline flicker on startup.

Each platform has a slightly different configuration scheme. We utilize Qt's QSettings library.

Option Names

  • ext_linegrid (true/false): Enables or disables the latest neovim rendering protocol.
  • ext_tabline (true/false): Equivalent to :GuiTabline, useful for preventing startup flicker.
  • ext_popupmenu (true/false): Equivalent to :GuiPopupmenu.

Windows

Windows stores its settings in the registry at Computer\HKEY_CURRENT_USER\Software\nvim-qt\nvim-qt.

You can change the values with regedit.exe: Registry Editor: Computer\HKEY_CURRENT_USER\Software\nvim-qt\nvim-qt

TODO: Add some .reg files for common settings, ext_linegrid, ext_tabline.

Linux

Linux stores its settings in ~/.config/nvim-qt/nvim-qt.conf.

Here is an example file:

[General]
ext_linegrid=true
ext_tabline=false

MacOS

TODO

GuiDropCustomHandler

This feature allows users to intercept or override Drag & Drop events.

Here is a sample function for your vimrc:

" Drag & Drop: echo 'You just opened: {filename}` before opening the file.
function! GuiDropCustomHandler(...)
	let l:fnames = deepcopy(a:000)
	let l:args = map(l:fnames, 'fnameescape(v:val)')

	for l:file in l:args
		echo "You just opened: " . l:file
		exec 'drop '.join(l:args, ' ')
	endfor
endfunction

For more information see :help GuiDrop or Pull Request 669.

⚠️ **GitHub.com Fallback** ⚠️