Member-only story
Modern Neovim — User Interface
Let’s check out interesting plugins to improve the Neovim user interface.
This article is part of the Modern Neovim series.
The Neovim configuration files are available in this repository.
Getting Started
We talked about Helix in the Helix series. Helix is a modal editor with a modern user interface. For example, it displays the pop-up menu for the keymappings on the bottom right, as shown below. We will take some cues from Helix and adapt them to the Neovim user interface.
KeyMapping
For our existing configuration, we use which-key.nvim
to display the key bindings, and hydra.nvim
for custom sub-modes and menus.
We can use the mini.clue
plugin to have a similar experience to Helix.
Let’s change our configuration to have the option to switch between which-key.nvim
and mini.clue
. In the lua/config/init.lua
file, we add the options to enable or disable both plugins.
return {
keymenu = {
which_key = false,
mini_clue = true,
},
...
We disable which-key.nvim
and enable mini.clue
.
In the lua/plugins/whichkey.lua
file, we specify a condition to load the plugin using the option.
{
"folke/which-key.nvim",
cond = function()
return require("config").keymenu.which_key
end,
....
mini.clue
In the lua/plugins/mini.lua
file, we install and configure the mini.clue
plugin.
We configure the delay to show the pop-up menu to be the same as vim.o.timeoutlen
.
window = {
delay = vim.o.timeoutlen,
}