R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
129 stars 15 forks source link

Can not get R running with NvChad/Windows 11 configuration #96

Closed ErwinTATP closed 2 months ago

ErwinTATP commented 3 months ago

I installed the plugin to work with NvChad, but when I open an R file, it reads:

Could not find R path in Windows Registry. If you have already installed R, please, set the value of 'R_path'.
R_app executable not found: 'Rterm.exe'

When I went on to try to start R program (\rf), the R window opened for less than half a second, and then instantly closed. The following message appeared in the status bar:

[Server] "Neovim" window not found
"R" exited with status 1

So I thought if the nvimcom package is correctly installed, so I ran :RDebugInfo, the following reading appears: (I have no idea how to copy these messages I'm noob) Does this mean the package has been installed?

RDebugInfo

I tried to add R_path in the system PATH and init.lua, but the error messages remain.

Then I tried to edit R_path in config.lua; this time, the R_path and Rterm.exe messages disappeared, but it still said "Neovim" window not found. I tried \aa and \l, but it only returned a message Did you start R?. I would highly appreciate some help.

Additional info: I'm using Windows 11, and the neovim is run in CMD. I also tried Powershell, but that did not work either.

jalvesaq commented 3 months ago

Please, wait until people who use Windows can help you...

JacintoCunha commented 2 months ago

@ErwinTATP, try to add the location of your Rterm.exe also to the system path (for example: "C:\Program Files\R\R-4.2.2\bin\x64"). I think the path doesn't walk through subdirectories to find the rterm.exe. In my case it solved the issue, and I could make R run.

The plugin still complained that it couldn't find R or the neovim window at the startup, but it worked properly anyways, at least until now.

@jalvesaq Thank you for your great work!!

ErwinTATP commented 2 months ago

@JacintoCunha seems to be working so far, thanks!

I have several deadlines to catch up, so a complete test have to wait.

akthe-at commented 2 months ago

@ErwinTATP Is everything working okay? @jalvesaq please feel free to tag me in Window's issues...sometimes life gets busy and I might not visit the repo for weeks a time but I'm always willing to swing by to see if I can help somebody out with getting setup on Windows!

ErwinTATP commented 2 months ago

@akthe-at Sorry for not updating the issue progress for a while! So far everything seems to be working by adding Rterm.exe location into PATH, though it still seems to pop up tons of "can't find this, can't find that" now and then.

I'm closing this now.