altermo / ultimate-autopair.nvim

A treesitter supported autopairing plugin with extensions, and much more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Specify pairs by regular expression

meithon opened this issue · comments

commented

I really like the fastwrap feature of this plugin!
I would be very happy if fastwrap could be done in HTML (JSX).
Right now I am adding {<div>, <div>} but I would like to use it with other tags.
So I would like to use regular expressions to specify pairs.

Like this:

opts.internal_pairs = {
	{ "<.*>", "<\/.*>"},
}

I tried to implement it myself, but couldn't figure out where to add it.
I hope implement it 🙏

It is on the TODO list for the next version.

commented

Really? I look forward to the next version!

commented

+1 this would be super useful! Definitely looking forward to it being added!