A dumb autopairs plugin for Neovim that tries not to get in your way.
It handles inserting closing braces/quotes, <CR>
and <BS>
.
It does not attempt to wrap existing text.
<CR>
works best with these settings:
vim.o.autoindent = true
vim.cmd("filetype plugin indent on")
Using your favourite package manager:
{
"mgnsk/dumb-autopairs.nvim",
event = "InsertEnter",
opts = {},
},
{
pairs = {
{
left = "(",
right = ")",
},
{
left = "[",
right = "]",
},
{
left = "{",
right = "}",
},
{
left = '"',
right = '"',
},
{
left = "'",
right = "'",
},
{
left = "`",
right = "`",
},
},
}
Note: only single-character braces/quotes are supported.