| Title: | High-Performance IPC Bridge for R Sessions |
|---|---|
| Description: | Implements a high-performance IPC bridge for R sessions using Unix domain sockets and Windows named pipes. Replaces legacy file-system watcher based workflows while keeping JSON-RPC communication semantics for IDE/editor integration. |
| Authors: | Randy Lai [aut, cre], Kun Ren [ctb], Grant McDermott [ctb], Tatsuya Shima [ctb], Fred Wu [ctb] |
| Maintainer: | Randy Lai <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 3.0.9000.9003 |
| Built: | 2026-10-12 15:50:55 UTC |
| Source: | https://github.com/REditorSupport/vscode-R |
Connect to the VS Code IPC server
connect( endpoint = NULL, use_rstudioapi = TRUE, plot_backend = c("auto", "jgd", "httpgd", "standard", "native"), attachment_id = NULL, auto_activate = TRUE )connect( endpoint = NULL, use_rstudioapi = TRUE, plot_backend = c("auto", "jgd", "httpgd", "standard", "native"), attachment_id = NULL, auto_activate = TRUE )
endpoint |
Character. Local named pipe / Unix domain socket endpoint. If NULL, uses SESS_ENDPOINT, then SESS_DISCOVERY_FILE. |
use_rstudioapi |
Logical. Enable rstudioapi emulation. Defaults to TRUE. |
plot_backend |
Plot backend: |
attachment_id |
Optional opaque identifier supplied by an external
terminal integration to correlate this attachment with its preparation.
It must be 1-128 ASCII characters from |
auto_activate |
Logical. Whether vscode-R should select this attachment
automatically. |
When SESS_DISCOVERY_FILE describes the connected endpoint, an
unexpected disconnect waits for a replacement endpoint in that file and
reconnects with the same runtime options and session identity. The optional
discovery jgdSocket string updates JGD_SOCKET when the resolved backend
includes jgd; an empty
string clears it, and an omitted field leaves it unchanged. Set
options(sess.quiet = TRUE) to suppress the successful connection message.
Invisibly returns TRUE when the IPC connection and runtime startup
succeed, or FALSE when the IPC endpoint is unavailable.
Publish a rich Interactive output
display(x, mime = NULL)display(x, mime = NULL)
x |
Object to display, or text for an explicit MIME type. |
mime |
Optional MIME type, such as text/markdown or text/html. |
Restores sess runtime hooks without changing the frontend console callbacks.
interactive_stop()interactive_stop()
Notify the client via IPC pipe (JSON-RPC 2.0 Notification)
notify_client(method, params = list())notify_client(method, params = list())
method |
A string representing the action (e.g., "dataview", "plot_updated") |
params |
A list containing the arguments for the command |
Emulate rstudioapi (or any client action) synchronously but without blocking the R Event Loop
request_client(action, args = list())request_client(action, args = list())
action |
String of the action name |
args |
List of arguments |