REditorSupport / REditorSupport/vscode-R
Add a setting to Include the renv library (not the cache) to libPaths
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
Is your feature request related to a problem? Please describe.
I am working with a project that has a dedicated renv, where some packages live directly in renv::paths$library() and are not just links to the renv::paths$cache(). I am trying to get the LSP to know about them.
My current workaround is to put .libPaths(c(renv::paths$library(), .libPaths())) in the local .Rprofile.
Describe the solution you'd like
I would like to have a setting, similar to the existing "r.useRenvLibPath" that does the above.
Describe alternatives you've considered
The existing "r.useRenvLibPath" setting includes the renv::paths$cache(), e.g. here
This does not work because it does not contain some packages in my project renv.
Additional context
I am not sure why you would ever want the cache over the project-specific library?
This also makes the LSP see packages from the whole renv cache, which might not even be from the current project.
Maybe the option should be updated to always use library? (Of course the library path might not exist in some projects, and that needs to be dealt with gracefully).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The existing behavior is referenced in R/languageServer.R; start by tracing r.useRenvLibPath and locating its setting declaration. Add the requested project-library option, handle a missing library path gracefully, and verify that the LSP sees packages from renv::paths$library().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100