Neovim for Beginners — User Interface

Explore the Neovim UI APIs.

alpha2phi
5 min readJun 22, 2022
Neovim for Beginners — User Interface

Neovim provides the Lua UI APIs (:h lua-ui) for user interaction. However, the default interface is very primitive. In this article, we will explore the Lua UI APIs and also the plugins to enhance the user interface.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

The Basics

In Neovim we have these Lua APIs.

  • vim.ui.input (:h vim.ui.input()) to prompt the user for input. This is similar to the Vimscript input (:h input()) function.
  • vim.ui.select (:h vim.ui.select()) to prompt the user to pick a single item from a collection of entries. This is similar to the Vimscript confirm (:h confirm()) function.

vim.ui.input

Let’s start with the vim.ui.input API.

--

--