-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncm-R not working consistently #9
Comments
Thanks for your feedback! First, you should check whether the bug comes from NCM or ncm-R. Python completion is a built-in feature of NCM so that's a good place to start. If NCM's Python completion works reliably 100% of the time, then there's probably something wrong with ncm-R. You should then try to find out if there's a pattern in the failures. Reading the logs in real time while trying to trigger the autocompletion is your best best. See this part of the README for instructions on how to debug this. I'm sorry I'm unable to help you here, as I don't use macOS and I'm not able to reproduce your issue myself. Any contribution from your part is more than welcome :) |
I confirmed that NCM Python completion is working but still having problems with ncm-R. |
I had the same problem on my macOS Sierra (10.12.6). |
Interesting. Most of the changes after 41459c1 relate to the encoding of completion data generated by Nvim-R, which some ncm-R Windows users had problems with (see jalvesaq/Nvim-R#276 and #8). jalvesaq solved it with jalvesaq/Nvim-R@311e585, then he changed the way Nvim-R detects local charsets : jalvesaq/Nvim-R@5de878a then jalvesaq/Nvim-R@5bfb647. Maybe these changes impacted macOS users somehow? @marskar could you try to rollback Nvim-R to 41459c1 as well? @jalvesaq what do you think? |
Wow, it is working now! |
The Python log has the following:
The issue was caused by jalvesaq/Nvim-R@2dc4962 Because Nvim-R no longer uses Python to generate random numbers, the environment variables |
We still may have problems with encoding. I could test R running within Cygwin on Windows and discovered that |
Sure, I'll keep all of you posted. Thanks for your input, I wasn't aware of this change.
Well, don't we always? Anyways, someone using Windows is welcome to test this out. |
Awesome! It works flawlessly now. |
Great! It works perfectly on my machine too. |
Great! I've merged it to |
I have the same problem of inconsistently working ncm-r since a few weeks.
Id be glad for help and im sorry if I didnt provide all necessary information to help debugging. Please let me know which further information you need. |
@fifdick Hello! I also has similar problems when using nvim-R and ncm-R. That is, when editing the *.R file, I can only get the suggestions about the existing packages for
Even though I tried 431cf47 for ncm-R, it did not work. In order to enhance the completion function, I also use
Here is my sessionInfo() for your reference: R version 4.0.2 (2020-06-22) Matrix products: default locale: attached base packages: loaded via a namespace (and not attached): NVIM v0.4.3 |
A couple of months ago, I introduced some incompatible changes in the |
Given the new comments by @fifdick, @AlfredSAM, and @jalvesaq, I reopened this issue. |
I am also experiencing the same difficulties as @AlfredSAM and @fifdick ; this issue also only cropped up recently, so I'm assuming it's because of the changes that Jalvesaq made. Thanks for opening the issue! |
That’s probably a good time to switch to r-lsp unfortunately i cannot fond any clear setup instructions |
@statquant, I agree. I gave r-lsp a try via a coc plugin called coc-r-lsp. I am running it in vimr (no relation to Nvim-R), so I can send code with command enter (like in RStudio on MacOS). |
@marskar @statquant Yes. I also try coc-r-lsp with nvim-R in nvim, and it seems to work well. I also use ALE to help format the codes automatically. |
@marskar and @AlfredSAM while coc-r works I have difficulties getting a lot from it. Somehow I fail to find documentation on how to setup all the features. Would you mind sharing what you have ? maybe we could create a gist with it and get a little bit more out of it. |
@statquant, I don't think there are any coc-r-lsp features to set up. There are however many awesome features available in the coc ecosystem of extensions.
options(
languageserver.server_capabilities = list(
snippetSupport = TRUE
)
)
let g:coc_snippet_next = '<tab>'
let g:coc_snippet_prev = '<s-tab>'
Other than |
I can't get ncm-R to work consistently.
I see autosuggestions only sometimes. I would like the plugin to work like in your video.
I'm on a Mac OS High Sierra (10.13.2 (17C205)) using brew installed neovim.
I tried both brew installed python3 with pip3 neovim installed and conda install python 3 and neovim client.
Do you have any suggestions of how to figure this out?
The text was updated successfully, but these errors were encountered: