19 lines
930 B
Lua
19 lines
930 B
Lua
local pairs = require('mini.pairs')
|
|
|
|
pairs.setup({
|
|
modes = { insert = true, command = true, terminal = false },
|
|
mappings = {
|
|
['('] = { action = 'open', pair = '()', neigh_pattern = '[^\\].' },
|
|
['['] = { action = 'open', pair = '[]', neigh_pattern = '[^\\].' },
|
|
['{'] = { action = 'open', pair = '{}', neigh_pattern = '[^\\].' },
|
|
|
|
[')'] = { action = 'close', pair = '()', neigh_pattern = '[^\\].' },
|
|
[']'] = { action = 'close', pair = '[]', neigh_pattern = '[^\\].' },
|
|
['}'] = { action = 'close', pair = '{}', neigh_pattern = '[^\\].' },
|
|
|
|
['"'] = { action = 'closeopen', pair = '""', neigh_pattern = '[^\\].', register = { cr = false } },
|
|
["'"] = { action = 'closeopen', pair = "''", neigh_pattern = '[^%a\\].', register = { cr = false } },
|
|
['`'] = { action = 'closeopen', pair = '``', neigh_pattern = '[^\\].', register = { cr = false } },
|
|
},
|
|
})
|