Package 'replconnect'

Title: Connect to an R Session from Neovim
Description: Serves the R session's variables, a grid viewer, runtime completion and plots to the replconnect Neovim plugin over a Unix-domain socket, using the REPLConnect protocol (docs/protocol.md). Designed for the arf console, where requests are handled on R's main thread while R is idle at the prompt.
Authors: Callum Arnold [aut, cre]
Maintainer: Callum Arnold <[email protected]>
License: file LICENSE
Version: 0.1.0
Built: 2026-10-14 07:52:06 UTC
Source: https://github.com/arnold-c/REPLConnect.R

Help Index


Capture plots from the unigd device

Description

Turning capture on makes unigd the default graphics device and publishes each new plot as a PNG to subscribed editors. Turning it off restores the previous device setting and deletes the retained files. Calling it while capturing only changes the retention limit.

Usage

capture_plots(enable = TRUE, limit = PLOT_DEFAULT_LIMIT)

Arguments

enable

TRUE to capture, FALSE to stop.

limit

Plots (files) to retain; the oldest are pruned.

Value

Whether plots are being captured, invisibly.


Enable or disable session input history

Description

Recording is on by default. Disabling it forgets retained inputs and removes the history capability; clients are notified when the setting changes. Change tracking continues even while history recording is disabled.

Usage

record_history(enabled = TRUE)

Arguments

enabled

A single TRUE or FALSE.

Value

The new recording setting, invisibly.


Is this session being served?

Description

Is this session being served?

Usage

serving()

Stop serving this R session

Description

Disconnects clients and removes the socket and discovery record. R keeps running. Idempotent.

Usage

shutdown()

Value

TRUE if a server was running, invisibly.


Serve this R session to the replconnect Neovim plugin

Description

Listens on ⁠/tmp/replconnect-<uid>/<pid>.sock⁠ (or ⁠$REPLCONNECT_DIR⁠) and writes a discovery record next to it. Idempotent.

Usage

start()

Value

The socket path and start time, invisibly.