We use the which-key.nvim
plugin to create key bindings and display a popup with possible key bindings as we type. In this article, let’s explore other alternative solutions.
This article is part of the Neovim for Beginners series.
The Neovim configuration files can be found in this repository.
Getting Started
The introduction of the Lua keymap APIs (:h lua-keymap
) makes it very easy to define key bindings. Several of these plugins use the Lua keymap APIs.
For those new to the Lua keymap APIs, check out this article.
legendary.nvim
Installation
legendary.nvim
helps us define keymaps, commands, and autocommands as simple Lua tables, building a legend at the same time. It can integrate with the which-key.nvim
plugin, allowing us to use existing which-key.nvim
tables with it.
In the lua/plugins.lua
file, we install it using packer.nvim
.