From b5d2509ca21ec5cdb64da87614dd525d3edda4e3 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Fri, 31 Jul 2026 18:31:45 +0200 Subject: [PATCH 1/3] Send `oak.sourceFetching.enabled` in LSP init options --- extensions/positron-r/package.json | 5 +++++ extensions/positron-r/package.nls.json | 1 + extensions/positron-r/src/lsp.ts | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/extensions/positron-r/package.json b/extensions/positron-r/package.json index 36bf1efff2b0..db237972f270 100644 --- a/extensions/positron-r/package.json +++ b/extensions/positron-r/package.json @@ -229,6 +229,11 @@ "default": true, "description": "%r.configuration.diagnostics.enable.description%" }, + "oak.sourceFetching.enabled": { + "type": "boolean", + "default": true, + "markdownDescription": "%r.configuration.oak.sourceFetching.enabled.description%" + }, "positron.r.symbols.includeAssignmentsInBlocks": { "type": "boolean", "default": false, diff --git a/extensions/positron-r/package.nls.json b/extensions/positron-r/package.nls.json index 3a1c006bf3e3..bb960b083dea 100644 --- a/extensions/positron-r/package.nls.json +++ b/extensions/positron-r/package.nls.json @@ -80,6 +80,7 @@ "r.configuration.pipe.native.description": "Native pipe available in R >= 4.1", "r.configuration.pipe.magrittr.description": "Pipe operator from the magrittr package, re-exported by many other packages", "r.configuration.diagnostics.enable.description": "Enable R diagnostics globally", + "r.configuration.oak.sourceFetching.enabled.description": "Recover the R sources of the packages your workspace uses, for intellisense and code navigation. Sources come from your local installation when available, and are otherwise downloaded from CRAN and cached on disk.", "r.configuration.symbols.includeAssignmentsInBlocks.description": "Controls whether assigned objects inside `{}` blocks are included as document symbols, in addition to top-level assignments. Reopen files or restart the server for the setting to take effect.", "r.configuration.workspaceSymbols.includeCommentSections.description": "Controls whether comment sections like `# My section ---` are included as workspace symbols.", "r.configuration.autoConvertFilePaths.description": "Automatically convert file paths when pasting files from file manager into R scripts. Converts backslashes (\\) to forward slashes (/), adds quotes, and formats multiple files as R vectors.", diff --git a/extensions/positron-r/src/lsp.ts b/extensions/positron-r/src/lsp.ts index b68b4e87cf47..c7230b16304a 100644 --- a/extensions/positron-r/src/lsp.ts +++ b/extensions/positron-r/src/lsp.ts @@ -138,6 +138,16 @@ export class ArkLsp implements vscode.Disposable { const { notebookUri } = this._metadata; const clientOptions: LanguageClientOptions = { + // Settings the server needs early before it answers `initialize`. + initializationOptions: { + oak: { + sourceFetching: { + enabled: vscode.workspace + .getConfiguration('oak.sourceFetching') + .get('enabled', true), + }, + }, + }, // If this client belongs to a notebook, set the document selector to only include that notebook, // Quarto virtual documents (vdocs), and notebook console inputs (inmemory scheme). // Otherwise, this is the main client for this language, so set the document selector to include From 6ead879170518998b3541ab7bdd76318cfb5ce24 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Mon, 3 Aug 2026 10:26:42 +0200 Subject: [PATCH 2/3] Remove init options after all --- extensions/positron-r/src/lsp.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/extensions/positron-r/src/lsp.ts b/extensions/positron-r/src/lsp.ts index c7230b16304a..b68b4e87cf47 100644 --- a/extensions/positron-r/src/lsp.ts +++ b/extensions/positron-r/src/lsp.ts @@ -138,16 +138,6 @@ export class ArkLsp implements vscode.Disposable { const { notebookUri } = this._metadata; const clientOptions: LanguageClientOptions = { - // Settings the server needs early before it answers `initialize`. - initializationOptions: { - oak: { - sourceFetching: { - enabled: vscode.workspace - .getConfiguration('oak.sourceFetching') - .get('enabled', true), - }, - }, - }, // If this client belongs to a notebook, set the document selector to only include that notebook, // Quarto virtual documents (vdocs), and notebook console inputs (inmemory scheme). // Otherwise, this is the main client for this language, so set the document selector to include From d32e85c30d3517d876d7c3c36466b8dd89cffcb3 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Mon, 3 Aug 2026 10:33:49 +0200 Subject: [PATCH 3/3] Bump Ark to posit-dev/ark#1370 --- extensions/positron-r/ark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/positron-r/ark b/extensions/positron-r/ark index db054ebabb07..9dfc3e7bce97 160000 --- a/extensions/positron-r/ark +++ b/extensions/positron-r/ark @@ -1 +1 @@ -Subproject commit db054ebabb074e58af0b4ddcbfdb9c995415c0b3 +Subproject commit 9dfc3e7bce97024865ffc5f3b31d29f3f0b56346