Closed trevorld closed 1 year ago
The message is displayed when the script R/before_ncs.R exits with error code 71. This should not happen if nvimcom is installed, its version isn't outdated and R's version is the same used to build nvimcom.
{nvimcom}
. For R minor version increments you generally don't need to re-build and re-install packages (especially if they don't provide a graphics device)...You are right. I will change it to check only major version changes. Thanks for the suggestion!
How do you install nvimcom
systemwide? I would use devtools::install_github("jalvesaq/nvimcom")
but that package appears deprecated.
How do you install
nvimcom
systemwide? I would usedevtools::install_github("jalvesaq/nvimcom")
but that package appears deprecated.
In the terminal I go into the cloned repo and in my (bash) shell enter:
cd R/nvimcom
sudo Rscript -e "devtools::install()"
The more up-to-date alternative to devtools::install_github()
would be remotes::install_github("jalvesag/nvimcom", subdir = "R/nvimcom")
(since the R package code is in a subdirectory of this repo...)
How do you install
nvimcom
systemwide? I would usedevtools::install_github("jalvesaq/nvimcom")
but that package appears deprecated.In the terminal I go into the cloned repo and in my (bash) shell enter:
cd R/nvimcom sudo Rscript -e "devtools::install()"
The more up-to-date alternative to
devtools::install_github()
would beremotes::install_github("jalvesag/nvimcom", subdir = "R/nvimcom")
(since the R package code is in a subdirectory of this repo...)
Thanks! I tried this, but I get:
> remotes::install_github("jalvesag/nvimcom", subdir = "R/nvimcom")
Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
Not Found
Did you spell the repo owner (`jalvesag`) and repo name (`nvimcom`) correctly?
- If spelling is correct, check that you have the required permissions to access the repo.
Got it! It should be:
remotes::install_github("R-nvim/R.nvim", subdir = "nvimcom")
Is there any way to suppress the
"/path/to/user/R/directory" is not writable. Create it now? [y/n]
message? Every time I open an R file in vim I need to pressn
and this is a bit annoying
I do not have a user-writable R directory and do not want one (I prefer to install my R packages sitewide as a root user)
I have already installed
{nvimcom}
site-wide by finding the{nvimcom}
package code within theNvim-R
source and manually installing it site-wideAfter pressing an initial "n" the plugin seems to run fine (i.e. I can start R sessions in vim and send code to them with the plugin)
I attempted to manually create a
vimcom_info
file in~/.cache/Nvim-R
but this doesn't suppress the inital "is not writable" message.R_compldir <- "~/.cache/Nvim-R" vimcom_info <- file.path(R_compldir, "vimcom_info") version <- packageVersion("nvimcom") |> as.character() home <- system.file(package = "nvimcom") Rversion <- getRversion() |> as.character() cat(version, home, Rversion, sep = "\n", file = vimcom_info)
This interactive message appears to be back. All my plugins are all up to date. How do I get rid of this message?
The message should appear only if Nvim-R tries to install nvimcom, which should happen only if nvimcom is outdated. So, the solution is to manually build and install nvimcom:
cd /tmp
R CMD build /path/to/Nvim-R/R/nvimcom
sudo R CMD INSTALL nvimcom_0.9-163.tar.gz
Thanks! I had forgotten that updating the plugins for nvim and the nightly packages from CRAN does not update the R package nvimcom from github. Also updating nvimcom makes the error go away. Thank you again!
"/path/to/user/R/directory" is not writable. Create it now? [y/n]
message? Every time I open an R file in vim I need to pressn
and this is a bit annoying{nvimcom}
site-wide by finding the{nvimcom}
package code within theNvim-R
source and manually installing it site-wideI attempted to manually create a
vimcom_info
file in~/.cache/Nvim-R
but this doesn't suppress the inital "is not writable" message.