Conversation
eitsupi
requested review from
Fred-Wu,
ManuelHentschel,
grantmcdermott,
randy3k and
renkun-ken
September 19, 2026 09:22
eitsupi
marked this pull request as draft
September 19, 2026 09:43
eitsupi
marked this pull request as ready for review
September 19, 2026 10:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #597
Close #1437
Supersede #1625
Related to #1130
Summary
r.executablePathas the canonical vanilla R executable for language-server and other background processesr.consolePathas the canonical interactive console executable, including bare executable names resolved fromPATH(for example,arforradian)r.rpath.<platform>andr.rterm.<platform>settings while preserving them as compatibility inputsr.rterm.preferredConsolessetting and the previously deprecated, unusedr.helpPanel.rpathsetting${workspaceFolder}against the relevant workspace or document resource when one is availableWhy these names?
The names follow the convention used by other VS Code language extensions: for example, Python uses
python.defaultInterpreterPath, Julia usesjulia.executablePath, and Ruby LSP usesrubyLsp.rubyExecutablePath.executablePathclearly identifies the vanilla executable used by the extension, while the parallelconsolePathname preserves vscode-R's important distinction between background R and an alternative interactive console.We cannot use the shorter
r.rpathandr.rtermwhile retaining their legacy platform-specific children: VS Code treats dotted configuration identifiers hierarchically, so scalar parent settings conflict withr.rpath.windows,r.rterm.linux, and the other existing keys. ThePathsuffix also makes clear that these settings select an executable location (including a name resolved fromPATH), rather than configuring console behavior more broadly.Resolution rules
Background/vanilla R resolves in this order:
r.executablePathr.rpath.<current platform>RonPATHInstallPath(Windows only)The interactive console resolves in this order:
r.consolePathr.rterm.<current platform>r.executablePathPATH, then the Windows registry)The distinction between background R and the interactive console remains intentional: background processes never use
r.consolePathor legacyr.rterm.<platform>. Also, a legacyr.rpath.<platform>override does not begin controlling the console; only the new canonicalr.executablePathcan provide that default.Both canonical settings use
machine-overridablescope because executable locations are machine-dependent while workspace overrides remain useful. Relevant terminal, language-server, task, R Markdown, C++ properties, and command call sites now pass their workspace or document URI so folder-level settings and${workspaceFolder}substitution use the same resource. Empty values are treated as unset. Explicit but unavailable values fail instead of silently selecting a different executable.Historical compatibility
The old settings were split by OS when defaults were hard-coded installation paths. The resolver keeps the later discovery behavior added for real-world installations:
RonPATHtakes priority over the Windows registry (Get R term path from registry in Windows #244, Use Windows registry to find R path #252, Prefer rPath from PATH #649)5e9c895)${userHome},${workspaceFolder},${fileWorkspaceFolder}, and${fileDirname}substitutions remain supported (allow to invoke R terminal also in relative paths #1398, Substitute variables inr.rpathandr.rtermsettings #1444)PATH, never interpreted as a workspace-relative path (Search for r.rterm.linux/mac on system PATH #1347, Executable name is resolved as relative terminal path #1437)The platform-specific settings remain supported for backward compatibility but are deprecated in favor of the canonical settings and may be removed in a future release.
Scope boundaries and deliberate follow-ups
.github/ISSUE_TEMPLATE/bug_report.mdintentionally remains unchanged even though it contains legacy setting examples. The template needs a broader rewrite, which will be handled separately rather than partially updating it in this PR.