Closed onlycalm closed 3 years ago
About coc issue, I'm not sure. If there is a more general problem that is reproducible with all plugins (or with nvim lsp in similar situations, for example), I may look into it, but if it's a coc.nvim specific thing honestly I don't care.
I've fed back the questions to the author of auto-pairs. I used other LSP plug-in tests (ALE), and there was no exception. It seems that this problem is only related to coc. I try to feed this back to the COC authors.
Thanks!
For the record, the original auto-pair author hasn't been online in a couple years (https://github.com/jiangmiao/auto-pairs/issues/309) -- and based on the pattern, they're probably not gonna come back, at least any time soon.
That being said, this is vim-visual-multi's fault. Some update is now causing errors. It doesn't have anything to do with keybind overrides, though -- those weren't an error in the earlier version I had installed, anyway. While testing, I couldn't repro with my plugin. Installed jiangmiao and updated everything, reproduced, and thought it had always been broken. Rolled back to my auto-pairs and it now broke, so it's definitely something related to vim-visual-multi.
Gonna have to look into this though (I'm maintaining a fork of auto-pairs -- I assume there's some plugin config that can be done for compatibility now too), but it really depends on what's classified as an error now. :VMDebug
doesn't really give any useful information on what's actually going wrong.
... though for whatever reason, bisecting vim-visual-multi doesn't find a single good version, including for versions that I knew were good xd
Here's more information.
Press d
in multi cursor mode to get an error message.
@onlycalm that error looks like #75, you should either update vim or use nvim.
@LunarWatcher I don't know what to say, other than this: plugins can be made easily compatible with VM, they only need a command to be disabled and one to be reenabled. Autopairs has these commands, but they don't reset <cr>
and <bs>
, so VM overwrites them anyway. It's not something I can fix on my part, it's autopairs commands that are broken (imho).
@mg979 For the second question. Like you say. I updated VIM8.1 to VIM8.2 and it worked fine. Thanks for your help.
~I have the same issue with a different autopairs plugin: windwp/nvim-autopairs
. It sounds like toggling the plugins keycaps is what's needed when the VM starts. How does one go about that?~
I found it was the backspace mapping and so I just disabled it, I can always use a different key for block mode.
vim.g.VM_maps = {
["I BS"] = '', -- disable backspace mapping
}
I just wanted to share my solution to the conflict with the windwp/nvim-autopairs
plugin. This should allow backspace to continue to work for both plugins and get rid of the warning:
-- lazy.nvim plugin spec
return {
'mg979/vim-visual-multi',
init = function()
-- Hack around issue with conflicting insert mode <BS> mapping
-- between this plugin and nvim-autopairs
vim.api.nvim_create_autocmd('User', {
pattern = 'visual_multi_start',
callback = function()
pcall(vim.keymap.del, 'i', '<BS>', { buffer = 0 })
end,
})
vim.api.nvim_create_autocmd('User', {
pattern = 'visual_multi_exit',
callback = function()
require('nvim-autopairs').force_attach()
end,
})
end,
}
I just wanted to share my solution to the conflict with the
windwp/nvim-autopairs
plugin. This should allow backspace to continue to work for both plugins and get rid of the warning:-- lazy.nvim plugin spec return { 'mg979/vim-visual-multi', init = function() -- Hack around issue with conflicting insert mode <BS> mapping -- between this plugin and nvim-autopairs vim.api.nvim_create_autocmd('User', { pattern = 'visual_multi_start', callback = function() pcall(vim.keymap.del, 'i', '<BS>', { buffer = 0 }) end, }) vim.api.nvim_create_autocmd('User', { pattern = 'visual_multi_exit', callback = function() require('nvim-autopairs').force_attach() end, }) end, }
Thank you, this solve my problem when I was working on TSX files.
Describe the issue: There is a conflict between Vim-visual-multi and the following plug-ins : auto-pairs, coc.nvim Maybe it's not the Vim-Visual-multi problem, but I don't know who to turn to. These are all great plugins, and I want to use them all together. I would be very grateful if you could give me some advice.
Steps to reproduce
Vim-visual-multi and auto-pairs conflict:
The high probability results in abnormal functioning of auto-pairs.
Vim-visual-multi and coc.nvim conflict:
When the COC detects a syntax error or warning in the file, using backspace in multi-cursor mode will cause an exception.