-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Is your feature request related to a problem? Please describe.
I recently found myself in a project which contained R code in a subfolder, where R was largely isolated to that folder. While you could make the case that this work should have been taken out of the project and given its own git repository, things just weren't that mature yet. Since it wasn't in the root folder, the R extension complained about missing languageserver.
For this usecase it would be great to be able to change the starting directory for the R process in this project to this subfolder. This is where I ues renv and have languageserver installed and all the other packages used by the R code.
Some issues touch upon this topic:
- Issue #1478: Several users have headaches over renv settings not being picked up
- Issue #1473: Executables and paths for R
- Issue #148 (from 2019): Very related issue
Describe the solution you'd like
Could we have a r.workingDirectory setting? And perhaps an interactive selector for this if there are several good candidates? So something like this in properties:
{
"r.workingDirectory": {
"type": "string",
"default": "",
"scope": "resource",
"description": "Working directory for R processes"
}
}Describe alternatives you've considered
I'd have to restructure all R projects in a monolithic project to run of one and the same renv.lock file in the project directory. Sure you could fork out each of those into their own repos, but as alluded to before, it'd be nice if this wasn't the forced solution to this.
Additional context
I have started on this in a fork.