Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to R Console will be documented in this file.

## [0.2.9] - 2026-06-19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align the release entry with package metadata

This new dated 0.2.9 section makes this look ready to tag as v0.2.9, but package.json and package-lock.json still declare 0.2.8; I checked .github/workflows/release.yml and the publish jobs explicitly fail when GITHUB_REF_NAME is not v + package.version. Tagging this commit as v0.2.9 would therefore build 0.2.8 VSIX artifacts and then fail before publishing, so either bump the package metadata in the same release change or keep this under an unreleased section.

Useful? React with 👍 / 👎.


### Fixed

- Fixed completion search for packages with large list of members

## [0.2.8] - 2026-06-16

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vsc-r-console",
"displayName": "R Console for VS Code",
"description": "A lightweight R console for VS Code",
"version": "0.2.8",
"version": "0.2.9",
"publisher": "RConsole",
"license": "SEE LICENSE IN LICENSE",
"icon": "images/Rlogo.png",
Expand Down
40 changes: 38 additions & 2 deletions src/Terminal/rTerminal/lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,47 @@ export class RTermLang {
}

const picks = toCompletionQuickPickItems(entries, context);
const selection = await vscode.window.showQuickPick(picks, {
const pickOptions = {
matchOnDescription: true,
matchOnDetail: true,
placeHolder: "R console completions",
});
};
const selection = context.kind !== "package"
? await vscode.window.showQuickPick(picks, pickOptions)
: await new Promise<CompletionPickItem | undefined>((resolve) => {
const pick = vscode.window.createQuickPick<vscode.QuickPickItem>();
let request = 0;
Object.assign(pick, { matchOnDescription: true, matchOnDetail: true, placeholder: pickOptions.placeHolder, items: picks });
pick.onDidChangeValue((value) => void (async () => {
const currentRequest = ++request;
const prefix = value.startsWith(context.prefix) ? value : context.prefix + value;
const cursorCol = context.replaceStart + prefix.length;
const currentLine = latestInput.currentLine.slice(0, context.replaceStart) + prefix + latestInput.currentLine.slice(latestInput.cursorCol);
const lines = [...latestInput.lines];
lines[latestInput.cursorRow] = currentLine;
const nextDoc = this.getOrUpdateCompletionDocument(lines.join("\n"));
if (!nextDoc) {
return;
}
const nextContext = { ...context, prefix, triggerCharacter: prefix.length === 0 ? context.triggerCharacter : undefined, snapshotInput: currentLine, snapshotCursor: cursorCol };
await this.consoleLsp?.prepareDocument(nextDoc);
const nextEntries = await collectCompletionEntries(
nextContext,
nextDoc,
new vscode.Position(latestInput.cursorRow, cursorCol),
sessionData,
lines.slice(0, latestInput.cursorRow),
this.options.getRecentSessionEntries?.() ?? [],
this.consoleLsp
);
if (currentRequest === request) {
pick.items = toCompletionQuickPickItems(nextEntries, { ...nextContext, snapshotInput: latestInput.currentLine, snapshotCursor: latestInput.cursorCol });
}
})().catch(() => undefined));
pick.onDidAccept(() => { const item = pick.selectedItems[0]; resolve(isCompletionPickItem(item) ? item : undefined); pick.hide(); });
pick.onDidHide(() => { request += 1; pick.dispose(); resolve(undefined); });
pick.show();
});

if (!isCompletionPickItem(selection)) {
return;
Expand Down
Loading