Neovim for Beginners — GUI
In this article, let’s explore modern GUIs for Neovim.
This article is part of the Neovim for Beginners series.
The Neovim configuration files are available in this repository.
Getting Started
Until now we only use the Neovim terminal user interface (TUI). Neovim is a project that seeks to aggressively refactor Vim, and one of the objectives is to maximize extensibility.
Neovim supports a plugin UI architecture to reduce its code base and delegate GUI implementation to external clients. The client(s) control the Neovim nvim
process via a msgpack-rpc API, allowing them to
- Execute Vim commands
- Evaluate Vimscript expressions
- Manipulate buffers, windows, and tabs
- Receive/handle editor events
We will review several interesting Neovim GUI clients implemented in different programming languages.
Neovide
Neovide is a simple graphical user interface for Neovim developed in Rust.
It provides all standard full features of Neovim. Beyond that, there are some visual niceties.
- Supports ligatures and full HarfBuzz-backed font shaping.
- Animated cursor
- Smooth scrolling
- Animated windows
- Blurred floating windows
- Emoji support
- WSL support
- Remote TCP support.
To use our configuration with Neovide, we create the nvbg.sh
shell script with the following code snippet.
#!/usr/bin/shNVIM_BEGINNER=~/.config/nvim-beginner
export NVIM_BEGINNERalias nvbg='XDG_DATA_HOME=$NVIM_BEGINNER/share XDG_CACHE_HOME=$NVIM_BEGINNER XDG_CONFIG_HOME=$NVIM_BEGINNER nohup neovide &'nvbg
We also configure the GUI font (:h ‘guifont’
) in the after/plugin/defaults.lua
file.
local opt = vim.opt-- GUI…