jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
966 stars 125 forks source link

Error detected while processing function StartFloatWin: Undefined variable: s:user_data #497

Closed anasem closed 4 years ago

anasem commented 4 years ago

Hello,

When auto complete floating menu is opened and trying to select an item the following error is produced:

Error detected while processing function StartFloatWin: Undefined variable: s:user_data

jalvesaq commented 4 years ago

Thanks for reporting the issue! I need to know what is your Vim/Neovim version, and what you are completing. Function names, function arguments, elements of data.frames?

jalvesaq commented 4 years ago

Are you using asyncomplete, coc.nvim, or ncm-R for automatic omnicompletion? I also need this information to try to replicate the issue.

emeralit commented 4 years ago

I have the same issue with Neovim v0.4.3 and ncm-R.

anasem commented 4 years ago

I'm also using Neovim v0.4.3 and ncm-R same as @emeralit (on Linux). The problem started after last plugin update.

anasem commented 4 years ago

Thanks a lot, it works perfectly now!

emeralit commented 4 years ago

Thanks you!

jalvesaq commented 4 years ago

This is a provisory fix. It would be better to have the floating window working with ncm-R, which is developed by @gaalcaras

jalvesaq commented 4 years ago

The last change committed to https://github.com/gaalcaras/ncm-R was on December 2018, and ncm2 seems to be only receiving bug fixes: https://github.com/ncm2/ncm2/commits/master

So, although ncm-R still works well, perhaps I should no longer make reference to it in Nvim-R's documentation.

emeralit commented 4 years ago

Hi, I tried to remove ncm2 and ncm-R plugins and installed deoplete in my init.vim. Now I have the same error as this issue.

942kid commented 4 years ago

Hi, I also have the same error messages after the last Nvim-R update. I am using neovim v0.4.3 but a different tab completion plugin, VimCompletesMe. However, after I switched to coc the completions worked fine.

emeralit commented 4 years ago

@942kid Hi, how did you configure coc? Thanks

jalvesaq commented 4 years ago

Does deoplete has a source for R?

jalvesaq commented 4 years ago

Now the initial value of s:user_data unconditionally {}.

942kid commented 4 years ago

Hi @emeralit, I followed the github README. Sorry for the confusion, but I just realized that the same error did happen when tab completion was mapped as in the example setup. It won't appear when the float window pop up for choices.

942kid commented 4 years ago

Now the initial value of s:user_data unconditionally {}.

Thanks a lot, @jalvesaq, for the quick fixes.

It seems the plugin now works fine with the tab completion. I just updated and tried with coc.

she3o commented 4 years ago

Now the initial value of s:user_data unconditionally {}

I had the same problem with coc.nvim and the update fixed it. Thank you!