altermo / ultimate-autopair.nvim

A treesitter supported autopairing plugin with extensions, and much more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fly mode in newer version of ultimate-autopair

marlun opened this issue · comments

I wrote in a closed issue #17 but thought I'd write a new one since the message might be missed when it's in a closed issue. In #17 you helped me setting up fly mode however in the new version it stopped working and I'm getting

|| ultimate-autopair:
|| Old configuration detected
|| The problem:
|| extensions option needs updating (aborting)
|| packer.nvim: Error running config for ultimate-autopair.nvim: ...vim/lua/ultimate-autopair/configs/default/utils/init.lua:44: attempt to compare two nil values

Here's my current config again which you helped me with above:

require('ultimate-autopair').setup({
	extensions = {
		{ 'cmdtype',  { '/', '?', '@' } },
		'multichar',
		'string',
		{ 'treenode', { inside = { 'comment' } } },
		{ 'escape',   { filter = true } },
		'rules',
		'filetype',
		{ 'alpha',   { before = { "'" } } },
		{ 'suround', { '"', "'" } },
		{ 'fly',     { ')', '}', ']', ' ', "'", '"', nofilter = true } },
	},
})

This worked great before and would really appreciate getting it working with the new version. There's no hurry though.

First, update to the newest version. (d31cc98)
Second:

require('ultimate-autopair').setup({
  extensions={fly={nofilter=true}},
  config_internal_pairs={
    {'"','"',fly=true},
    {"'","'",fly=true},
  },
})

Thanks for listening and adding support!