hrsh7th / nvim-insx

Flexible key mapping manager.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto_pair does not work with \( \)

tani opened this issue · comments

Description

The following bug could be avoided using insx.recipe.substitute.

Code

local insx = require('insx')
local pair = require('insx.recipe.auto_pair')
insx.add('(', pair({
  open = [[\\(]],
  close = [[\)]]
}))

Expected behaviour

| is a cursor. When I type ( before the backslash, I expect to complete the close bracket \).

\| ==> \(| ==> \(|\)

Actual behaviour

| is a cursor. When I type ( before the backslash, I expect to complete the close bracket \) and \.

\| ==> \(| ==> \\(|\)