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.
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.
In a previous article, we configured both
nvim-cmp as our completion plugins.
nvim-autopairs supports both of them. Here we are going to use
nvim-cmp, add the following lines to
:PackerInstall command to install the plugin.
Now auto pairs feature should work for multiple characters like
For Lua, we should have end-wise completion.