Closed gaalcaras closed 6 years ago
I have the same problem with Neovim on Windows 10 - I don't get any autocompletion suggestions from your plugin.
Thank you for your feedback. Unfortunately, I won't have access to a Windows 10 machine any time soon, so I'm still unable to reproduce the issue.
Could you please answer the following questions? They'll help me to narrow down the problem.
omnils_{PKGNAME}_{PKGVERSION}
in your g:g:rplugin_compldir
directory? If not, try to generate some by loading some R packages in Nvim-R.NVIM_PYTHON_LOG_FILE=nvim.log NVIM_PYTHON_LOG_LEVEL=INFO nvim
, start an R session with Nvim-R and type some text that should trigger completion (read.csv
or summary
are good test cases). Then check the contents of nvim.log_py3_cm_core
. Do you get lines like word: "read.csv", func: "", pkg: , pipe: None
?Yes - NCM works fine with Latex and the Vimtex plugin; it also works for Ultisnips completion and path completion in R.
Yes.
No, I can't find any such lines.
Thanks for looking into this, let me know if there is anything else I can do to help.
Okay, I was finally able to reproduce the bug on Ubuntu 16.04. Could you try out the next
branch and tell me if it works on Windows 10?
For instance with vim-plug:
Plug 'gaalcaras/ncm-R', { 'branch': 'next' }
@jalvesaq, does it solve the issue for you?
Unfortunately, the issue is not solved. Nvim-completion-manager works with python scripts, but nothing happens with R scripts when, for example, I slowly type writeLines
after starting R.
Too bad, I'll keep looking. What's your version of Python 3? I had 3.6.3 on Arch, but Ubuntu 16.04 came with 3.5.2 and that's why I couldn't reproduce the bug on my system.
Also, did you get a message in Nvim by any chance? Something like [INFO] ncm-R can't find the completion data
?
My Python 3 is 3.6.3 too, and the file nvim.log_py3_cm_core
does not include the string ncm
.
I am going to merge the branch "omni_one" now, so you will not waste your time working with the old completion functions.
I am no longer setting R_LIBS_USER
in my ~/.bashrc
and now ncm-R is working. All R packages are now installed at ~/software/R-3.4.3/library
. In my init.vim
, I have:
Plug 'jalvesaq/Nvim-R'
Plug 'roxma/nvim-completion-manager'
Plug 'gaalcaras/ncm-R', { 'branch': 'next', 'for': 'r' }
I'm glad it's working now! However I don't understand how this could affect ncm-R. Just curious, what was the previous value of R_LIBS_USER
?
Anyway, I'll be merging next
to master
soon. @adrianadermon, did you have time to test it on Windows 10?
The value of R_LIBS_USER
was ~/.cache/R
.
Tried with the next
branch, but it still doesn't work.
I had my R_LIBS_USER set to ~/Documents/R/win-library/3.3, so I removed it to see if that helps (default is C:/Program files/R/R-3.4.1/library), but this didn't help either. I should note that the default is in .libPaths() in both cases, so perhaps the problem could be related to windows path with spaces in it (although that doesn't ex[lain @jalvesaq's problem)?
perhaps the problem could be related to windows path with spaces in it
Yes, I suspect this has to do with reading files on Windows. I've created the branch windows-fix
in an attempt to fix it. Can you try it and see if it works?
Doesn't work, but at least I have a new error for you. Starting R from Nvim-R works fine, as does sending lines, but when start typing something in the R script file, I get the following error in the R console:
> Error: '\l' is an unrecognized escape in character string starting ""C:/Users/adrad148/AppData/Local/Temp/NvimR-adrad148\l"
[Process exited -1073741784]
I think I understand where the problem comes from.
@jalvesaq and I are trying to change how ncm-R and Nvim-R communicate with each other. I believe this particular bug should disappear after I reimplement how ncm-R gets loaded R packages. See: https://github.com/jalvesaq/Nvim-R/issues/257#issuecomment-352260210. I'll get back to you when this is done and working on Linux.
I'm not sure it will solve every bug on Windows though, but we're getting there!
@adrianadermon It seems from #4 that the next version of ncm-R works on Windows. If you want to give it a try, please use the following branches (this is using vim-plug
):
Plug 'jalvesaq/Nvim-R', { 'branch': 'auto_list' }
Plug 'gaalcaras/ncm-R', { 'branch': 'auto-list' }
Update: both plugins have been updated, so you can stay on master
and update them.
It works!
I do get the following error when I type the first letter in insert mode:
[ERROR] [ncm-R] Could not load completion data: 'charmap' codec can't decode byte 0x9d in position 60: character maps to <undefined>
...but then everything seems to work fine.
Great! Thanks for the feedback.
I may have an idea about that weird message, I'll try and fix that soon.
@jalvesaq reported he could not get ncm-R to work properly.
Unfortunately, I was unable to reproduce the issue with this minimal setup. If someone's able to reproduce the bug, please let me know.
Please read: https://github.com/jalvesaq/Nvim-R/issues/257#issuecomment-350031761