Should it be possible to drop into the R console from the nix-shell and build script within that environment? #182
Replies: 9 comments 11 replies
-
Do you have an |
Beta Was this translation helpful? Give feedback.
-
you might need to install the languageserver package for neovim |
Beta Was this translation helpful? Give feedback.
-
Thanks, for the suggestion I will take a look! |
Beta Was this translation helpful? Give feedback.
-
I see some require() in that config you shared wonder if that's the issue. Try to drop in a shell with a vanilla nvim session, it might be lazyvim that messes things up |
Beta Was this translation helpful? Give feedback.
-
So I set up Neovim with the required R plugins, and was able to start it from a Nix Shell and run some code. There's probably a plugin or something in your .Rprofile that messes things up, but it's difficult for me to say what. Maybe you could start from a fresh config and add things one by one to identify what's wrong? |
Beta Was this translation helpful? Give feedback.
-
Try adding languageserver to your environments list of packages here
https://github.com/VtheRtech/trade-union-behaviour-2020s/blob/208773bc82b6f36f49d3d12e9a5d0f2ded9343e5/default.nix#L22
Sent from Proton Mail Android
…-------- Original Message --------
On 6/16/24 06:08, Vincent wrote:
Okay, so I read up on some of the documentation of R.nvim turns out if you add:
options(
languageserver.server_capabilities
=
list
(
completionProvider
=
FALSE
,
completionItemResolve
=
FALSE
)
)
To the .Rprofile it will remove the the need for having require("lspconfig").r_language_server.setup({}) in init.lua it will use a neovim plugin that is already a dependency for R.nvim.
I created https://github.com/VtheRtech/Vim-Config-Files/tree/minimalist a minimalist branch with all the nonessentials removed, and I used hooks to create a hard link to.Rprofile in my home directory so it switches whenever I use git switch
I followed the same steps I first posted and I'm still getting the same error. If I remove
.libPaths(c(.libPaths(),
"
~/Rpackages/
"
))
.libPaths(c(.libPaths(),
"
~/R/x86_64-pc-linux-gnu-library/4.3/
"
))
and go enter into the shell environment and then enter into the text editor, no package is recognized and no package can be installed.
—
Reply to this email directly, [view it on GitHub](#182 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAW4EMRR7TOUT7L4OIEX2G3ZHUFVTAVCNFSM6AAAAABJDO5ELOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBUG42TO).
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I didn't have to do anything special, nvimcom got installed automatically, but do the instructions here help?
https://nixos.wiki/wiki/Nvim-r
Since you're not using homemanager, just adding gcc to the list of packages should suffice
Another answer might be to try to install it from Github:
https://github.com/jalvesaq/Nvim-R/tree/master/R/nvimcom
Since it's in a subfolder it might not be possible to install it like another R package, so maybe you'll need to rehost it.
…-------- Original Message --------
On 6/16/24 13:42, Vincent wrote:
Unfortunately, this did not work. Is it possible to install nvimcom using rix?
—
Reply to this email directly, [view it on GitHub](#182 (reply in thread)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAW4EMTDNHOCGANVUMB3W6LZHV22HAVCNFSM6AAAAABJDO5ELOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBWGMYTC).
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Would there be way to add: options( To a rix file so that it will build an R profile with those options? The culprit has to be the language server. If I disable and use the cmp plugin instead I think it should work. |
Beta Was this translation helpful? Give feedback.
-
Let's close this and open an issue instead |
Beta Was this translation helpful? Give feedback.
-
Hello Everyone!
I have had some fun running this package, great work so far!
One thing I'm having some difficulty with is running R code through the console while in the shell environment. I can run my script through the command line with no issues, and I believe the utility is there for locking in analysis to a specific version of R after the whole script is written and debugged.
here is the script I have been testing
Here is neovim configurations I am using along with associated .Rprofile in the readme
I am curious is this mainly an issue with the environment I'm running? or perhaps I should be running the
env_build.R
script every time to enter the environment that was built using nix within the R console?Below is better visual show case of what I am trying to do:
When I try going to my text editor through the nix-shell these errors appear the environment doesn't seem to work. R doesn't see
{targets}
or any other relevant package installed.Beta Was this translation helpful? Give feedback.
All reactions