@@ -224,34 +224,15 @@ otherwise
224
224
225
225
See also: https://github.com/LunarWatcher/auto-pairs/issues/66
226
226
227
- Due to the way Vim's input system works, if you map `<CR> ` to configure
228
- auto-complete insertions, you can and will see auto-pairs act weirdly if
229
- | g:AutoPairsMapCR | is set.
230
-
231
- There's a large number of auto-complete plugins, and a large number of
232
- different systems. Several modern auto-complete plugins are additionally
233
- async, which adds a layer of complexity.
234
-
235
- The execution order of auto-pairs and auto-complete plugins, though
236
- particularly coc.nvim has been demonstrated to do this, isn't deterministic.
237
- coc's timeout may or may not fire in time for auto-pairs to have completed,
238
- and if it fires before auto-pairs has a chance to do anything, `pumvisible ()`
239
- or similar isn't viable.
240
-
241
- Simply put, the pum may have closed by the time auto-pairs is executed. Simply
242
- put, there's no easy way to fix this behavior.
243
-
244
- Workarounds~
245
-
246
- The first option is disabling | g:AutoPairsMapCR | , and changing your map to
247
- incorporate `\<cr>\<C-r> = autopairs#Keybinds#IgnoreInsertEnter (' autopairs#AutoPairsReturn' )\<cr> `
248
- into your mapping. Auto-pairs simply wasn't meant for this type of use, so
249
- yes, the command is nasty. This has to be as the fallback to the pum being
250
- visible for a custom `<CR> ` map. This is left as an exercise to the reader.
251
-
252
- Alternative B... stop using `<CR> ` to insert the completion match, and get
253
- used to <C-y> , which is a default Vim mapping for completion insertion. Or, of
254
- course, map completion insertion to an altogether different key.
227
+ There's no known reason why auto-pairs misbehaves when <CR> is remapped to
228
+ allow for `<CR> ` to pick an autocomplete option. See the linked issue
229
+ for debug instructions that would help me narrow this down if you're currently
230
+ running into this issue.
231
+
232
+ Note that there previously was an incorrect explanation for the error both
233
+ in this section of the help document, and the issue. That explanation was
234
+ based on a blatant misunderstanding. See also | autopairs-bad-cr | for a general
235
+ problem description, as well as roughly the same troubleshooting steps
255
236
256
237
==============================================================================
257
238
7. Test failures (and related errors) *autopairs-test-failures*
0 commit comments