Closed jandamm closed 3 years ago
It seems the range.start.character
is -6
while it should be 7
.
Which is because the current line does not contain the match and is 13
chars shorter than the code assumes.
There is also another weird case which I cannot reproduce with vimls
.
I type Rul<C-x><C-o><C-y>
and it completes to Rule
invoking s:on_complete_done('Rule')
. Which is fine.
Then I type (<C-x><C-o>
which invokes s:on_complete_done('Rule')
again. Which is wrong. Afterwards it presents the completion which is what would be in the brackets. When accepting the completion it the context is changed and (
is deleted. Which results in the same error.
I might improve it because I have more knowledge than when I implemented it.
I'm not sure about other side effects but it seems to work quite well with this changes:
plugin/vsnip_integ.vim:11
+autocmd CompleteDonePre * if complete_info(['mode']).mode !=? '' | call vsnip_integ#on_complete_done(v:completed_item) | endif
-autocmd CompleteDone * call vsnip_integ#on_complete_done(v:completed_item)
Hey I've got the following error:
I use the builtin neovim lsp with the builtin omnifunc. To reproduce this error open
autoload/vsnip-integ.vim
withlspconfig.vimls
setup:I use these completeopts:
menu
, withmenu,menuone
it does however work.Then type:
Now you should see
call s:remove_completed_text(context)${0
Here is another error since${0
shouldn't be there.Then type
<DEL>
until the current line iscall s:remove_completed_tex
. Then<C-x><C-o>
again. Now this error should happen.When you exit insert mode between the two invocations of omnifunc it doesn't produce this error.