Open rhcher opened 2 years ago
I need some time to locate the problem. But the plugin works well with ultisnip
.
I think the possible reason is nvim-snippy
use the extmarks
feature that relies on the keyboard input to maintain the correct position of the extmarks
. However, smart-pairs
does not like most paring plugins that feed the pair keys with feedkeys
, it directly resets the line with nvim_set_current_line
. So it is pitiful that smart-pairs
cannot work with nvim-snippy
now.
There may be two ways to totally fix it:
nvim_buf_get_current_extmarks
, so that it is possible to update all extmarks
at current positionI need to reproduce the issue to check if it does be caused by the extmarks
.
Well, it is sure that nvim_set_current_line
will push all extmarks
to the next line. So smart-pairs
is incompatible with extmarks
now.
I will work on it to update the extmarks
of the current line later.
@rhcher now it should work in most cases
Yes, it now works really perfect for me, I will close this. If someone still find there are some problem with extmarks
, I can reopen this.
This plugin works very silky smooth (thanks to nvim_set_current_line
), many thanks for your great work on this plugin!
The only issue is that when you delete an empty line, the marks will still be broken, I'll fix it later.
Explain the issue
smart-pairs can't work with nvim-snippy plugin, it will break snippy behavior. I'm not sure if this is a bug in the smart-pairs.
Steps to reproduce
run
nvim -u vimrc.vim test.c
We can input like this
Then we press
tab
key, and the snippt will be expanded.Then we press
tab
key and the cursor jump to next place and then we input"
.Minimal working example
test.c
Minimal vimrc file
vimrc.vim
Additonal information
nvim version: NVIM v0.7.0-dev+1125-g726ec7fb1 I can provide any other information if needed