on master help sign in
fix: add ` and $ on ignored next characters

fix #285

commitccbf4098e85f6105bc033fec15466cbfd5ca7356 authorzztrieuzz <zztrieuzz@gmail.com> dateThu 24 Nov 2022, 06:24 (4 years ago) parent6b6e35f
3 files changed+8−2
README.md+1−1 lua/nvim-autopairs.lua+1−1 tests/nvim-autopairs_spec.lua+6
README.md+1−1
@@ -34,7 +34,7 @@ local disable_filetype = { "TelescopePrompt" }
3434local disable_in_macro = false -- disable when recording or executing a macro
3535local disable_in_visualblock = false -- disable when insert after visual block mode
3636local disable_in_replace_mode = true
37−local ignored_next_char = [=[[%w%%%'%[%"%.]]=]
37+local ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=]
3838local enable_moveright = true
3939local enable_afterquote = true -- add bracket pairs after quote
4040local enable_check_bracket_line = true --- check bracket in same line
lua/nvim-autopairs.lua+1−1
@@ -20,7 +20,7 @@ local default = {
2020 disable_in_macro = false,
2121 disable_in_visualblock = false,
2222 disable_in_replace_mode = true,
23− ignored_next_char = [=[[%w%%%'%[%"%.]]=],
23+ ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
2424 break_undo = true,
2525 check_ts = false,
2626 enable_moveright = true,
tests/nvim-autopairs_spec.lua+6
@@ -689,6 +689,12 @@ local data = {
689689 [[}]],
690690 },
691691 },
692+ {
693+ name='open bracker on back tick',
694+ key = [[(]],
695+ before = [[ |`abcd`]],
696+ after = [[ (`abcd`) ]]
697+ }
692698}
693699
694700local run_data = _G.Test_filter(data)