@@ -19,7 +19,8 @@ local default = {
1919 disable_filetype = { 'TelescopePrompt', 'spectre_panel' },
2020 disable_in_macro = false,
2121 disable_in_visualblock = false,
22− ignored_next_char = [=[[%w%%%'%[%"%.]]=],
22+ disable_in_replace_mode = true,
23+ ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
2324 break_undo = true,
2425 check_ts = false,
2526 enable_moveright = true,
@@ -165,6 +166,10 @@ local function is_disable()
165166 return true
166167 end
167168
169+ if M.config.disable_in_replace_mode and vim.api.nvim_get_mode().mode == "R" then
170+ return true
171+ end
172+
168173 if M.config.disable_in_visualblock and utils.is_block_wise_mode() then
169174 return true
170175 end
@@ -297,7 +302,7 @@ M.on_attach = function(bufnr)
297302 bufnr,
298303 'i',
299304 '<bs>',
300− string.format('v:lua.MPairs.autopairs_bs(%d)', bufnr),
305+ 'v:lua.MPairs.autopairs_bs()',
301306 { expr = true, noremap = true }
302307 )
303308 end