Skip to content

Use session package context and clean Rd hover text in embedded R - #907

Open
renkun-ken wants to merge 3 commits into
codex/webr-language-serverfrom
codex/embedded-session-packages
Open

renkun-ken wants to merge 3 commits into
codex/webr-language-serverfrom
codex/embedded-session-packages

Conversation

@renkun-ken

Copy link
Copy Markdown
Member

Summary

Embedded clients may supply the installed packages and attached search order of the execution session that owns a document. Package-name suggestions, namespace exports, unqualified functions, signatures, and help then reflect that context. Changes in the catalogue invalidate stale provider caches while retaining open and unsaved editor buffers. The default standalone server keeps its existing library behavior.

Clean terminal overstrikes from the plain Rd help fallback, including cached help, before returning editor hover text. Preserve actual underscores, Markdown code, and document ranges.

Verification

  • Ran the native provider tests and the real embedded server in webR. After installing data.table, library(data.t) offered the package and data.table:: returned exports. Attaching and detaching changed unqualified completion, and attachment order selected the expected masked function.
  • Verified that base::library help has no backspace characters and that hover ranges remain correct, including text preceded by an astral character.
  • In desktop VS Code, selecting and copying the “Loading/Attaching and Listing of Packages” heading and copying the full hover succeeded with a 17-cell Interactive history.

Stacked on #905. The extension-side integration is tracked in vscode-R #2003.

@renkun-ken
renkun-ken force-pushed the codex/embedded-session-packages branch from 2266aaa to d6d6faf Compare November 30, 2026 16:13
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