Open alexhallam opened 2 years ago
Could this problem be from the languageserversetup
package and not related to this repository?
I am getting the same error. Any solution to this?
@KryeKuzhinieri What is your procedure for installation? Are you installing it the way it says in the README?
I am on Ubuntu 20.04 and I tried
:LspInstall r_server_language
Then, I tried installing the packages directly to R and now it throws the following error
R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> options(langserver_library = "/home/kryekuzhinieri/.local/share/nvim/lsp_servers/r_language_server.tmp");
> options(repos = list(CRAN = "http://cran.rstudio.com/"));
> rlsLib <- getOption("langserver_library");
>
> didInstallRemotes <- FALSE;
> tryCatch(
+ expr = { library("remotes") },
+ error = function (e) {
+ install.packages("remotes", lib = rlsLib);
+ loadNamespace("remotes", lib.loc = rlsLib);
+ didInstallRemotes <- TRUE;
+ }
+ );
>
> remotes::install_github("jozefhajnala/languageserversetup", lib = rlsLib);
Skipping install of 'languageserversetup' from a github remote, the SHA1 (3daf44a7) has not changed since last install.
Use `force = TRUE` to force installation
Error in loadNamespace("languageserversetup", lib.loc = rlsLib) :
there is no package called ‘languageserversetup’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
>
> if (didInstallRemotes) {
+ remove.packages("remotes", lib = rlsLib);
+ }
>
> loadNamespace("languageserversetup", lib.loc = rlsLib);
spawn: R failed with exit code 1.
@KryeKuzhinieri Could you describe exactly what steps were taken? Perhaps it is a Neovim issue?
:LspInstall r_server_language
I think there is a problem with this command. (And I don't think it's defined in this repository)
I recently installed neovim where I decided to use the Astro Vim configuration to make the transition from vim to nvim faster. Firstly I tried:
:LspInstall r_server_language
But it threw the error @alexhallam got. Then I installed the packages manually
install.packages("remotes")
remotes::install_github("jozefhajnala/languageserversetup")
install.packages("languageserver")
But I got the error described above. Just to be sure that I have all the dependencies, I tried
apt install --assume-yes --no-install-recommends build-essential libcurl4-openssl-dev libssl-dev libxml2-dev r-base
But they were all there.
It seems likely that something was written to Rprofile
file by :LspInstall r_server_language
.
Therefore, if you check the contents of the Rprofile
and remove such processing, it may function properly.
I recommend opening a issue in the repository where :LspInstall r_server_language
is defined, not here.
@KryeKuzhinieri I recommend opening an issue on https://github.com/williamboman/nvim-lsp-installer and linking from this issue.
@eitsupi Thanks for your feedback. I raised the issue here https://github.com/williamboman/nvim-lsp-installer/issues/604
Issue was resolved here https://github.com/williamboman/nvim-lsp-installer/issues/604
I am guessing there is something obvious I missed.
remotes::install_github("REditorSupport/languageserver"
in RWhen I ran
:LspInstall r_server_language
I got this: