-
Notifications
You must be signed in to change notification settings - Fork 125
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
Support remote R session (located in a different machine) #759
Comments
Nvim-R relies on the existence of many files created by R. Some of them might be big and it would slow down R usage if Nvim-R had to wait for them to be transferred by a TCP connection. Please, look at Please, see https://github.com/jalvesaq/Nvim-R/wiki/Remote-access |
I added support for R into vimcmdline. If accessing the remote machine through vim.g.cmdline_app = {
r = 'ssh -t [email protected] R --no-save',
} |
Thanks! |
I have just tried the instructions that were on https://github.com/jalvesaq/Nvim-R/wiki/Remote-access and they no longer work. Nvim-R has become more complex since 2017, and many files created by I will delete the code that was an attempt to enable remote access of R. You have to use vimcmdline or another plugin to send code to R running remotely. |
Can you make the following hard-coded R command more configurable? Nvim-R/R/nvimcom/src/apps/nclientserver.c Lines 1037 to 1046 in 97601b0
And this line worry me a little bit:
Is there no other way to get (n)VIM<->remote-R great interoperability? |
Nvim-R has many redundant features.
|
This is a code that runs in the background. It should work without any need for user configuration. Ideally, users should only choose an option meaning "I want to access R remotely", and all necessary internal changes should be automatic. In general, users should choose options that represent what they want and we would have to program Nvim-R to do what is required to make the option work. |
I made another attempt at running R remotely: https://github.com/jalvesaq/Nvim-R/tree/remote You may have to manually install Debugging code is enabled in the |
The |
Will try this out probably next week! (In a linux environment) |
I could compile the code with |
I wrote instructions for |
Tried it on Linux, and working almost perfectly! |
Update: |
R starts faster now. But I couldn't fix the Object Browser. I guess the problem is caused by a delay in file transfer from the remote machine to the local one. When R finishes writing a file, nvimcom sends a message to nclientserver through the established TCP connection. Then, the nclientserver immediately reads the file. I added the options If my guess is correct, the solution could be to transfer data from R's workspace through the TCP connection, using the remotely mounted directories only to get data on installed packages, which only change when new versions are installed. |
As I did in REditorSupport/vscode-R#1394 , passing data in a TCP-only way was proved to be very useful. For binary data, if you have, using Base64 encoding is the easiest solution(see my implementation). In addition, it was very comfortable (and increased robustness and debugging abilities) the ability to take an existing R session and connect&disconnect it from the IDE on-the-fly, by simple R file loading and calling |
I will try your suggestion, but maybe only next week, depending on my spare time. |
The list of objects in |
Thanks! Works(verified)! |
The user can run remote R session on a different machine by controlling
R_app
,R_cmd
andR_args
global vars.However, I suppose because the nvim-R communication uses also the filesystem (on temporary dir), it fails to connect to a remote machine hosting the R session.
Since Nvim-R uses already TCP to connect between process, why do we need also a file for that?
Do you think it's possible to have cross-machine communication?
For reference, this is my PR doing much more work than probably needed here on the VSCode-R extension: REditorSupport/vscode-R#1394
The text was updated successfully, but these errors were encountered: