Neovim for Beginners— Auto Pairs

Configure treesitter-based auto-pairing, auto-tagging, and end-wise completion.

2 min readJan 22, 2022
Neovim for Beginners — Auto Pairs

In this article, we are going to

  • Configure automated pairings for multiple characters and HTML tags.
  • Configure end-wise completion for Lua.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Auto Pairs

In the lua/plugins.lua file, add the following lines to install nvim-autopairs.

Create a new file lua/config/autopairs.lua with the following content.

We use treesitter to check for a pair, and also configure the experimental end-wise feature for Lua.




Software engineer, Data Science and ML practitioner.