Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitute variables in r.rpath and r.rterm settings #1444

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Nov 4, 2023

What problem did you solve?

#1398 allows specifying an R term path relative to the current workspace folder, which causes an undesirable behavior as described in #1437.

This PR no longer allows relative path but switches to an approach (more standard for vscode extensions) using variable substitutions in r.rpath and r.rterm settings.

VS Code has built-in support for variable substitution in launch.json and tasks.json files as described at https://code.visualstudio.com/docs/editor/variables-reference. We support a small subset of those variables which are most useful here:

  • ${userHome} - the path of the user's home folder
  • ${workspaceFolder} - the path of the folder opened in VS Code
  • ${fileWorkspaceFolder} - the current opened file's workspace folder
  • ${fileDirname} - the current opened file's folder path

We could always add more if demanded.

@renkun-ken renkun-ken merged commit 4b2e340 into REditorSupport:master Nov 6, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant