Closed Frederick888 closed 2 years ago
Nvim strikes again.
I assume you're referring to this:
What I have there is a hack. The long term is switching it out with a return
, which will prevent auto-pairs from initialising altogether, but provide a non-standard alternative for manually enabling it (like a command). The idea there was to not initialise auto-pairs at all if it's a blacklisted directory or filetype.
I'm doubting whether an explicit reenable is needed though. I think, for now anyway, just switching it to a return
is good enough. If that breaks someone's workflow, I can deal with that later. It's not too hard to implement anyway, but a secondary init command does potentially bring with it some edge-cases, particularly if it's incorrectly used.
A PR would be appreciated. I have a lot of stuff to do at the moment :upside_down_face: The docs for both variables also need to be updated to reflect that auto-pairs actually can't be enabled if those are triggered
Another plugin that I use (registers.nvim) recently started using insert mode pop-ups, and I got hit by a compatibility issue between it and auto-pairs: https://github.com/tversteeg/registers.nvim/pull/68#issuecomment-1250607358
I had a glance at the code and it seems a clean solution is to simply skip setting up auto-pairs key maps if file type is
registers
.I understand the long-term goal is skipping key maps while allowing auto-pairs to be re-enabled even if a buffer is in
g:AutoPairsDirectoryBlacklist
org:AutoPairsFiletypeBlacklist
, but in this case I really don't have the need to re-enable. So I wonder if it's ok to have some new options to achieve this for now? This seems quite straightforward and I'm happy to submit a PR. Thank you.