summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorgi Kirilov <>2020-11-22 15:10:50 +0200
committerGeorgi Kirilov <>2023-10-04 18:24:59 +0800
commit10a082c9d90789b64ec5d3bb9b5f7b80a72fae1c (patch)
tree3c2d482fdea6af045080f9429e73c9af233edc80
parent4bcb76cfa376606d522131642c7083741f2e98c4 (diff)
downloadvis-pairs-10a082c9d90789b64ec5d3bb9b5f7b80a72fae1c.tar.gz
Configurable exceptions for autopairs
-rw-r--r--pairs.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/pairs.lua b/pairs.lua
index 7ec317c..a1534b3 100644
--- a/pairs.lua
+++ b/pairs.lua
@@ -421,6 +421,7 @@ vis.events.subscribe(vis.events.INIT, function()
or M.map[1] and M.map[1][key]
or builtin_textobjects[key]
if not p then return end
+ if M.no_autopairs[key] and M.no_autopairs[key][win.syntax or ""] then return end
for selection in win:selections_iterator() do
local pos = selection.pos
M.key = key
@@ -445,6 +446,7 @@ M = {
get_range_outer = outer,
prefix = {outer = "a", inner = "i", opening = "[", closing = "]"},
autopairs = true,
+ no_autopairs = {["'"] = {markdown = true, [""] = true}},
unpair = {}
}