REditorSupport / REditorSupport/vscode-R
Configurable Working Directory for the R Process(es)
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 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.
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
Start by reviewing the proposed implementation in the linked fork and tracing how the extension starts R processes and reads resource-scoped settings. Done means an R working-directory setting can be configured for a project and is used by the relevant R processes, with the requested behavior covered by tests if the repository provides them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100