-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<CR>
compatibility with autopairs.nvim
#77
Comments
With In my opinion, this is much more configurable and easier to setup for niche cases. |
what am i saying. i think ill add a resolve_conflict mapping or smth that detects for any conflict |
wait i got a good idea (tell me if this is a bad idea) ill just add a new_bullet_hook that can run whatever function u want |
sorry I'm just using you as a rubber ducky heres a solution if u want vim.keymap.set("i", "<CR>", function()
-- run autolist-new-bullet after the <cr> of nvim-autopairs-cr
-- timeout of 0ms delays enough for my computer but u might need to adjust
local timeoutms = 0
vim.loop.new_timer():start(timeoutms, 0, vim.schedule_wrap(function()
require("autolist").new_bullet()
end))
return require("nvim-autopairs").autopairs_cr()
end, { expr = true, noremap = true })
|
I use "ZhiyuanLck/smart-pairs" have the same problem, I tried this and it worked, thanks! require("pairs"):setup({
enter = {
enable_mapping = true,
enable_cond = false,
enable_fallback = function()
-- https://github.com/gaoDean/autolist.nvim/issues/77
vim.loop.new_timer():start(0, 0, vim.schedule_wrap(function()
require("autolist").new_bullet()
end))
require('pairs.utils').feedkeys('<cr>')
end,
},
})
|
I am experiencing the same issue (autolist and autopairs) and adding this makes |
In the recent update, autolist depecrated the custom mapping function in favor for native mapping. But this change caused some regressions.
Previously resolved issues with autopairs (#43) is now a problem again.
Any straightforward way to fix this? Why not bring back the custom mapping functions? I honestly don't see how the "native" method is better in this context.
The text was updated successfully, but these errors were encountered: