diff --git a/README.md b/README.md index 34b14be..a53e800 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ local disable_filetype = { "TelescopePrompt" } local disable_in_macro = false -- disable when recording or executing a macro local disable_in_visualblock = false -- disable when insert after visual block mode local disable_in_replace_mode = true -local ignored_next_char = [=[[%w%%%'%[%"%.]]=] +local ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=] local enable_moveright = true local enable_afterquote = true -- add bracket pairs after quote local enable_check_bracket_line = true --- check bracket in same line diff --git a/lua/nvim-autopairs.lua b/lua/nvim-autopairs.lua index da6f1f5..3135811 100644 --- a/lua/nvim-autopairs.lua +++ b/lua/nvim-autopairs.lua @@ -20,7 +20,7 @@ local default = { disable_in_macro = false, disable_in_visualblock = false, disable_in_replace_mode = true, - ignored_next_char = [=[[%w%%%'%[%"%.]]=], + ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=], break_undo = true, check_ts = false, enable_moveright = true, diff --git a/tests/nvim-autopairs_spec.lua b/tests/nvim-autopairs_spec.lua index 31dd1fb..1edaa46 100644 --- a/tests/nvim-autopairs_spec.lua +++ b/tests/nvim-autopairs_spec.lua @@ -689,6 +689,12 @@ local data = { [[}]], }, }, + { + name='open bracker on back tick', + key = [[(]], + before = [[ |`abcd`]], + after = [[ (`abcd`) ]] + } } local run_data = _G.Test_filter(data)