R-nvim / R.nvim

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

Could not find R path in Windows Registry #43

Closed akthe-at closed 4 months ago

akthe-at commented 4 months ago

On Windows 10, as of this morning with the new updates over the last 12 hours I am not able to build/install nvimcom. During the installation process I get an error that says Could find R path in Windows Registry. If you already installed R, please, set the value of 'R_path'.

I am wondering if I missed somewhere that the config options from before need to be altered for the new R-nvim, specifically items like (vim.g.R_path='')

jalvesaq commented 4 months ago

Although I cannot run R.nvim on Windows, I can cross-compile nvimcom code with MinGW, but I forgot to do it. A bug caught by MinGW is now fixed.

If you still have problems, maybe it is from this commit: https://github.com/jalvesaq/tmp-R-Nvim/commit/dcac55f210fd4ad70587df5918d2fb603b1e6866

akthe-at commented 4 months ago

@jalvesaq that fixed the build issue, However, that error message regarding the r_path still persists.

If I run nvim on Bash I do not get that error, if I run it through powershell I get that error. If I type "r" into bash it starts an R console REPL, but there is a builtin alias for "Invoke-History" in powershell via "r"....do you guys think this is related to that difference in the error vs no error?

jalvesaq commented 4 months ago

This is in the part of the code that doesn't run in my system.

akthe-at commented 4 months ago

Everything still works at least.

Further testing found this as the only ways to get around the "error" message so far. Either by A, using bash to start Neovim or by opening a file directly with Neovim aka "nvim main.r" from PowerShell. It doesn't seem to matter how i change commands like R_path it doesn't impact the message.

Overall, the message does not seem to impact functionality at all.

jalvesaq commented 4 months ago

When using bash are you using Windows or Linux within Windows? If using Windows, in Neovim, the result of :echo has("win32") should be 1; In R, the output of Sys.info() should include "Windows" or something similar.

akthe-at commented 4 months ago

I am using Git Bash technically, run from inside the Wezterm Terminal (Git Bash downloaded as a portable standalone binary). :echo has(“win32”) = 1 anf Sys.info() has sysname = “Windows”.

The above holds true from Neovim started inside a Bash shell or Powershell…shell.