From 74d03c3c639f8452f11b69c1c00c424a4cb47e46 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Fri, 11 Jul 2025 16:56:36 +0200 Subject: [PATCH 1/3] Default to radian console if option rterm.preferRadian is true (defaults to false) rterm.preferRadian defaults to false so vanilla R is used by default. --- README.md | 2 +- package.json | 4049 +++++++++++++++++++++++++------------------------- src/util.ts | 33 +- 3 files changed, 2052 insertions(+), 2032 deletions(-) diff --git a/README.md b/README.md index a2a3671f..f780fd45 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Go to the [wiki](https://github.com/REditorSupport/vscode-R/wiki) to view the do The following software or extensions are recommended to enhance the experience of using R in VS Code: -* [radian](https://github.com/randy3k/radian): A modern R console that corrects many limitations of the official R terminal and supports many features such as syntax highlighting and auto-completion. +* [radian](https://github.com/randy3k/radian): A modern R console that corrects many limitations of the official R terminal and supports many features such as syntax highlighting and auto-completion. By default, the extension will use vanilla R if available. To prefer radian, set `r.rterm.preferRadian` to `true`. * [VSCode-R-Debugger](https://github.com/ManuelHentschel/VSCode-R-Debugger): A VS Code extension to support R debugging capabilities. diff --git a/package.json b/package.json index 840963d4..9d43da27 100644 --- a/package.json +++ b/package.json @@ -1,2043 +1,2048 @@ { - "name": "r", - "displayName": "R", - "description": "R Extension for Visual Studio Code", - "version": "2.8.6", - "author": "REditorSupport", - "license": "SEE LICENSE IN LICENSE", - "publisher": "REditorSupport", - "icon": "images/Rlogo.png", - "repository": { - "type": "git", - "url": "https://github.com/REditorSupport/vscode-R" - }, - "bugs": { - "url": "https://github.com/REditorSupport/vscode-R/issues" - }, - "categories": [ - "Programming Languages", - "Snippets", - "Other" - ], - "keywords": [ - "R", - "R language", - "R documentation", - "R Markdown" - ], - "engines": { - "vscode": "^1.75.0" - }, - "activationEvents": [ - "workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}", - "onCommand:r.runSelectionInActiveTerm", - "onWebviewPanel:rhelp" - ], - "main": "./dist/extension", - "contributes": { - "terminal": { - "profiles": [ - { - "title": "R Terminal", - "id": "r.terminal-profile" - } - ] + "name": "r", + "displayName": "R", + "description": "R Extension for Visual Studio Code", + "version": "2.8.6", + "author": "REditorSupport", + "license": "SEE LICENSE IN LICENSE", + "publisher": "REditorSupport", + "icon": "images/Rlogo.png", + "repository": { + "type": "git", + "url": "https://github.com/REditorSupport/vscode-R" }, - "viewsContainers": { - "activitybar": [ - { - "id": "workspaceViewer", - "title": "R", - "icon": "./images/Rlogo.svg", - "when": "r.isActive" - } - ] + "bugs": { + "url": "https://github.com/REditorSupport/vscode-R/issues" }, - "views": { - "workspaceViewer": [ - { - "id": "workspaceViewer", - "name": "Workspace", - "icon": "./images/Rlogo.svg", - "contextualTitle": "R" - }, - { - "id": "rHelpPages", - "name": "Help Pages", - "icon": "./images/Rlogo.svg", - "contextualTitle": "R", - "when": "r.helpViewer.show" - }, - { - "id": "rLiveShare", - "name": "Live Share Controls", - "icon": "./images/Rlogo.svg", - "contextualTitle": "R", - "when": "r.WorkspaceViewer:show && !r.liveShare:isGuest", - "visibility": "collapsed" - } - ] - }, - "viewsWelcome": [ - { - "view": "workspaceViewer", - "when": "!r.WorkspaceViewer:show", - "contents": "R workspace viewer requires that the [session watcher be enabled](https://github.com/REditorSupport/vscode-R/wiki/R-Session-watcher)." - }, - { - "view": "rHelpPages", - "contents": "R Help Pages" - }, - { - "view": "rLiveShare", - "contents": "R Live Share not active.", - "when": "!r.liveShare:aborted" - }, - { - "view": "rLiveShare", - "contents": "Could not connect to Live Share service.", - "when": "r.liveShare:aborted" - } - ], - "languages": [ - { - "id": "rd", - "extensions": [ - ".rd" - ], - "aliases": [ - "R documentation", - "r documentation" - ], - "configuration": "./language-configuration/rd.json" - }, - { - "id": "debian-control.r", - "extensions": [ - ".Rproj" - ], - "aliases": [ - "R DCF" - ], - "filenames": [ - "DESCRIPTION", - ".lintr" - ], - "configuration": "./language-configuration/dcf.json" - }, - { - "id": "namespace.r", - "aliases": [ - "R NAMESPACE" - ], - "filenames": [ - "NAMESPACE" - ], - "configuration": "./language-configuration/rnamespace.json" - }, - { - "id": "buildignore.r", - "aliases": [ - "R ignore" - ], - "filenames": [ - ".Rbuildignore" - ], - "configuration": "./language-configuration/rbuildignore.json" - } - ], - "snippets": [ - { - "language": "r", - "path": "./snippets/r-snippets.json" - }, - { - "language": "rd", - "path": "./snippets/r-snippets.json" - }, - { - "language": "rmd", - "path": "./snippets/rmarkdown.json" - } - ], - "grammars": [ - { - "language": "rd", - "scopeName": "text.tex.latex.rd", - "path": "./syntaxes/rd.json" - }, - { - "language": "debian-control.r", - "scopeName": "debian-control.r", - "path": "./syntaxes/dcf.json", - "embeddedLanguages": { - "meta.embedded.block.r": "r" - } - }, - { - "path": "./syntaxes/Rcpp.json", - "scopeName": "comment.block.r", - "injectTo": [ - "source.cpp" - ] - }, - { - "language": "namespace.r", - "scopeName": "namespace.r", - "path": "./syntaxes/rnamespace.json" - }, - { - "language": "buildignore.r", - "scopeName": "buildignore.r", - "path": "./syntaxes/rbuildignore.json" - } - ], - "commands": [ - { - "command": "r.workspaceViewer.refreshEntry", - "title": "Manual Refresh", - "icon": "$(refresh)", - "category": "R Workspace Viewer", - "enablement": "rSessionActive" - }, - { - "command": "r.workspaceViewer.view", - "title": "View", - "icon": "$(open-preview)", - "category": "R Workspace Viewer" - }, - { - "command": "r.workspaceViewer.clear", - "title": "Clear environment", - "icon": "$(clear-all)", - "category": "R Workspace Viewer", - "enablement": "rSessionActive" - }, - { - "command": "r.workspaceViewer.remove", - "title": "Remove", - "icon": "$(close)", - "category": "R Workspace Viewer" - }, - { - "command": "r.workspaceViewer.save", - "title": "Save workspace", - "icon": "$(save)", - "category": "R Workspace Viewer", - "enablement": "rSessionActive" - }, - { - "command": "r.workspaceViewer.load", - "title": "Load workspace", - "icon": "$(folder-opened)", - "category": "R Workspace Viewer" - }, - { - "command": "r.workspaceViewer.package.showQuickPick", - "title": "Show QuickPick", - "category": "R Workspace Viewer" - }, - { - "command": "r.browser.refresh", - "title": "Refresh", - "icon": "$(refresh)", - "category": "R" - }, - { - "command": "r.browser.openExternal", - "title": "Open in external browser", - "icon": "$(link-external)", - "category": "R" - }, - { - "command": "r.showHelp", - "title": "Show help", - "category": "R" - }, - { - "command": "editor.action.webvieweditor.showFind", - "title": "R: Find in WebView", - "icon": "$(search)", - "category": "R" - }, - { - "title": "Create R terminal", - "category": "R", - "command": "r.createRTerm" - }, - { - "title": "Run Source", - "category": "R", - "command": "r.runSource", - "icon": "$(run)" - }, - { - "title": "Knit Rmd", - "category": "R", - "command": "r.knitRmd", - "icon": "$(run-below)" - }, - { - "title": "Knit Rmd To PDF", - "category": "R", - "command": "r.knitRmdToPdf" - }, - { - "title": "Knit Rmd To HTML", - "category": "R", - "command": "r.knitRmdToHtml" - }, - { - "title": "Knit Rmd To All Formats", - "category": "R", - "command": "r.knitRmdToAll" - }, - { - "title": "Run Source with Echo", - "category": "R", - "command": "r.runSourcewithEcho" - }, - { - "title": "Run Selection/Line", - "category": "R", - "command": "r.runSelection" - }, - { - "title": "Show number of rows for selected object", - "category": "R", - "command": "r.nrow" - }, - { - "title": "Show length for a selected object", - "category": "R", - "command": "r.length" - }, - { - "title": "Show first part of a selected object", - "category": "R", - "command": "r.head" - }, - { - "title": "Show first part of a selected object (transposed)", - "category": "R", - "command": "r.thead" - }, - { - "title": "Show names for a selected object", - "category": "R", - "command": "r.names" - }, - { - "title": "View selected object", - "category": "R", - "command": "r.view" - }, - { - "title": "Create gitignore", - "category": "R", - "command": "r.createGitignore" - }, - { - "title": "Create .lintr to the workspace", - "category": "R", - "command": "r.createLintrConfig" - }, - { - "title": "Preview Dataframe", - "category": "R", - "command": "r.previewDataframe" - }, - { - "title": "Preview Environment", - "category": "R", - "command": "r.previewEnvironment" - }, - { - "title": "Load All", - "category": "R Package", - "command": "r.loadAll" - }, - { - "title": "Build", - "category": "R Package", - "command": "r.build" - }, - { - "title": "Build Binary", - "category": "R Package", - "command": "r.buildBinary" - }, - { - "title": "Check", - "category": "R Package", - "command": "r.check" - }, - { - "title": "Document", - "category": "R Package", - "command": "r.document" - }, - { - "title": "Install", - "category": "R Package", - "command": "r.install" - }, - { - "title": "Test", - "category": "R Package", - "command": "r.test" - }, - { - "title": "Generate C/C++ Configuration", - "category": "R Package", - "command": "r.generateCCppProperties" - }, - { - "title": "Attach Active Terminal", - "category": "R", - "command": "r.attachActive" - }, - { - "title": "Run Command With Selection or Word in Terminal", - "category": "R", - "command": "r.runCommandWithSelectionOrWord" - }, - { - "title": "Run Command With Editor Path in Terminal", - "category": "R", - "command": "r.runCommandWithEditorPath" - }, - { - "title": "Run Command in Terminal", - "category": "R", - "command": "r.runCommand" - }, - { - "title": "Run from Beginning to Line", - "category": "R", - "command": "r.runFromBeginningToLine" - }, - { - "title": "Run from Line to End", - "category": "R", - "command": "r.runFromLineToEnd" - }, - { - "title": "Run Selection/Line (Retain Cursor)", - "category": "R", - "command": "r.runSelectionRetainCursor" - }, - { - "title": "Select Current Chunk", - "category": "R", - "command": "r.selectCurrentChunk" - }, - { - "title": "Run Current Chunk", - "category": "R", - "command": "r.runCurrentChunk" - }, - { - "title": "Run Current Chunk and Move to Next Chunk", - "category": "R", - "command": "r.runCurrentChunkAndMove" - }, - { - "title": "Run Previous Chunk", - "category": "R", - "command": "r.runPreviousChunk" - }, - { - "title": "Run Next Chunk", - "category": "R", - "command": "r.runNextChunk" - }, - { - "title": "Run Above Chunks", - "category": "R", - "command": "r.runAboveChunks" - }, - { - "title": "Run Current and Below Chunks", - "category": "R", - "command": "r.runCurrentAndBelowChunks" - }, - { - "title": "Run Below Chunks", - "category": "R", - "command": "r.runBelowChunks" - }, - { - "title": "Run All Chunks", - "category": "R", - "command": "r.runAllChunks" - }, - { - "title": "Go to Previous Chunk", - "category": "R", - "command": "r.goToPreviousChunk" - }, - { - "title": "Go to Next Chunk", - "category": "R", - "command": "r.goToNextChunk" - }, - { - "title": "New Draft", - "category": "R Markdown", - "command": "r.rmarkdown.newDraft" - }, - { - "title": "R Markdown (rmd)", - "category": "R Markdown", - "when": false, - "command": "r.rmarkdown.newFileDraft" - }, - { - "title": "R Document (r)", - "category": "R", - "when": false, - "command": "r.newFileDocument" - }, - { - "command": "r.rmarkdown.setKnitDirectory", - "title": "Set Knit directory", - "icon": "$(zap)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.showPreviewToSide", - "title": "Open Preview to the Side", - "icon": "$(open-preview)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.showPreview", - "title": "Open Preview", - "icon": "$(open-preview)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.preview.refresh", - "title": "Refresh Preview", - "icon": "$(refresh)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.preview.openExternal", - "title": "Open in External Browser", - "icon": "$(link-external)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.preview.showSource", - "title": "Show Source", - "icon": "$(go-to-file)", - "category": "R Markdown" - }, - { - "title": "Toggle Style", - "category": "R Markdown", - "command": "r.rmarkdown.preview.toggleStyle", - "icon": "$(symbol-color)" - }, - { - "title": "Enable Auto Refresh", - "category": "R Markdown", - "command": "r.rmarkdown.preview.enableAutoRefresh", - "icon": "$(sync)" - }, - { - "title": "Disable Auto Refresh", - "category": "R Markdown", - "command": "r.rmarkdown.preview.disableAutoRefresh", - "icon": "$(sync-ignored)" - }, - { - "title": "Launch RStudio Addin", - "category": "R", - "command": "r.launchAddinPicker" - }, - { - "command": "r.helpPanel.back", - "title": "Go Back", - "category": "R Help Panel", - "enablement": "r.helpPanel.canGoBack", - "icon": "$(arrow-left)" - }, - { - "command": "r.helpPanel.forward", - "title": "Go Forward", - "category": "R Help Panel", - "enablement": "r.helpPanel.canGoForward", - "icon": "$(arrow-right)" - }, - { - "command": "r.helpPanel.openExternal", - "title": "Open in external browser", - "category": "R Help Panel", - "enablement": "r.helpPanel.canOpenExternal", - "icon": "$(link-external)" - }, - { - "title": "Search Package Topics", - "category": "R Help Panel", - "command": "r.helpPanel.searchPackage", - "icon": "$(search)" - }, - { - "title": "Open Topic in new Panel", - "category": "R Help Panel", - "command": "r.helpPanel.openInNewPanel", - "icon": "$(add)" - }, - { - "title": "Clear Cached Files", - "category": "R Help Panel", - "command": "r.helpPanel.clearCache", - "icon": "$(refresh)" - }, - { - "title": "Filter Packages", - "category": "R Help Panel", - "command": "r.helpPanel.filterPackages", - "icon": "$(filter)" - }, - { - "title": "Remove from favorites", - "category": "R Help Panel", - "command": "r.helpPanel.removeFromFavorites", - "icon": "$(star-full)" - }, - { - "title": "Add to favorites", - "category": "R Help Panel", - "command": "r.helpPanel.addToFavorites", - "icon": "$(star-empty)" - }, - { - "title": "Show all packages", - "category": "R Help Panel", - "command": "r.helpPanel.showAllPackages", - "icon": "$(star-full)" - }, - { - "title": "Show only favorites", - "category": "R Help Panel", - "command": "r.helpPanel.showOnlyFavorites", - "icon": "$(star-empty)" - }, - { - "title": "Remove Package", - "category": "R Help Panel", - "command": "r.helpPanel.removePackage", - "icon": "$(trash)" - }, - { - "title": "Update Installed Packages", - "category": "R Help Panel", - "command": "r.helpPanel.updateInstalledPackages", - "icon": "$(clone)" - }, - { - "title": "Update/reinstall Package", - "category": "R Help Panel", - "command": "r.helpPanel.updatePackage", - "icon": "$(cloud-download)" - }, - { - "title": "Install multiple packages", - "category": "R Help Panel", - "command": "r.helpPanel.installPackages", - "icon": "$(expand-all)" - }, - { - "title": "Show QuickPick", - "category": "R Help Panel", - "command": "r.helpPanel.showQuickPick", - "icon": "$(zap)" - }, - { - "title": "Summarize Identical Topics", - "category": "R Help Panel", - "command": "r.helpPanel.summarizeTopics", - "icon": "$(fold)" - }, - { - "title": "Don't Summarize Identical Topics", - "category": "R Help Panel", - "command": "r.helpPanel.unsummarizeTopics", - "icon": "$(unfold)" - }, - { - "title": "Open help for selection", - "category": "R Help Panel", - "command": "r.helpPanel.openForSelection" - }, - { - "title": "Open help for path", - "category": "R Help Panel", - "command": "r.helpPanel.openForPath" - }, - { - "command": "r.liveShare.toggle", - "category": "R Live Share", - "title": "Toggle" - }, - { - "command": "r.liveShare.retry", - "title": "Retry connection to Live Share service", - "category": "R Live Share", - "icon": "$(refresh)" - }, - { - "title": "Toggle Style", - "category": "R Plot", - "command": "r.plot.toggleStyle", - "icon": "$(symbol-color)" - }, - { - "title": "Toggle Full Window Mode", - "category": "R Plot", - "command": "r.plot.toggleFullWindow", - "icon": "$(screen-full)" - }, - { - "title": "Toggle Preview Plot Layout", - "category": "R Plot", - "command": "r.plot.togglePreviewPlots", - "icon": "$(list-flat)" - }, - { - "title": "Export Plot", - "category": "R Plot", - "command": "r.plot.exportPlot", - "icon": "$(clone)" - }, - { - "title": "Close Plot", - "category": "R Plot", - "command": "r.plot.closePlot", - "icon": "$(trash)" - }, - { - "title": "Hide Plot", - "category": "R Plot", - "command": "r.plot.hidePlot", - "icon": "$(close)" - }, - { - "title": "Restore Plots", - "category": "R Plot", - "command": "r.plot.resetPlots", - "icon": "$(discard)" - }, - { - "title": "Previous Plot", - "category": "R Plot", - "command": "r.plot.prevPlot", - "enablement": "r.plot.canGoBack", - "icon": "$(chevron-left)" - }, - { - "title": "Next Plot", - "category": "R Plot", - "command": "r.plot.nextPlot", - "enablement": "r.plot.canGoForward", - "icon": "$(chevron-right)" - }, - { - "title": "First Plot", - "category": "R Plot", - "command": "r.plot.firstPlot", - "enablement": "r.plot.canGoBack", - "icon": "$(arrow-left)" - }, - { - "title": "Last Plot", - "category": "R Plot", - "command": "r.plot.lastPlot", - "enablement": "r.plot.canGoForward", - "icon": "$(arrow-right)" - }, - { - "title": "Zoom In", - "category": "R Plot", - "command": "r.plot.zoomIn", - "icon": "$(zoom-in)" - }, - { - "title": "Zoom Out", - "category": "R Plot", - "command": "r.plot.zoomOut", - "icon": "$(zoom-out)" - }, - { - "title": "Show Viewers", - "category": "R Plot", - "command": "r.plot.showViewers", - "icon": "$(versions)" - }, - { - "title": "Open Httpgd Url", - "category": "R Plot", - "command": "r.plot.openUrl", - "icon": "$(link)" - }, - { - "title": "Open in External Browser", - "category": "R Plot", - "command": "r.plot.openExternal", - "icon": "$(link-external)" - } + "categories": [ + "Programming Languages", + "Snippets", + "Other" ], - "keybindings": [ - { - "command": "r.runSelection", - "key": "Ctrl+enter", - "mac": "cmd+enter", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runSelection", - "key": "Ctrl+enter", - "mac": "cmd+enter", - "when": "editorTextFocus && editorLangId == 'rmd'" - }, - { - "command": "r.runSelectionRetainCursor", - "key": "alt+enter", - "mac": "option+enter", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runCurrentChunk", - "key": "Ctrl+shift+enter", - "mac": "cmd+shift+enter", - "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" - }, - { - "command": "r.runAboveChunks", - "key": "Ctrl+alt+p", - "mac": "cmd+alt+p", - "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" - }, - { - "command": "r.runSource", - "key": "shift+Ctrl+s", - "mac": "shift+cmd+s", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.knitRmd", - "key": "shift+Ctrl+k", - "mac": "shift+cmd+k", - "when": "editorTextFocus && editorLangId == 'rmd'" - }, - { - "command": "r.runSourcewithEcho", - "key": "shift+Ctrl+enter", - "mac": "shift+cmd+enter", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runFromBeginningToLine", - "key": "Ctrl+alt+b", - "mac": "cmd+alt+b", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runFromLineToEnd", - "key": "Ctrl+alt+e", - "mac": "cmd+alt+e", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.rmarkdown.showPreviewToSide", - "key": "Ctrl+k v", - "mac": "cmd+k v", - "when": "editorTextFocus && editorLangId == 'rmd'" - }, - { - "command": "r.rmarkdown.showPreview", - "key": "Ctrl+shift+v", - "mac": "cmd+shift+v", - "when": "editorTextFocus && editorLangId == 'rmd'" - } + "keywords": [ + "R", + "R language", + "R documentation", + "R Markdown" ], - "menus": { - "commandPalette": [ - { - "command": "r.workspaceViewer.view", - "when": "false" - }, - { - "command": "r.workspaceViewer.remove", - "when": "false" - }, - { - "command": "r.workspaceViewer.package.showQuickPick", - "when": "false" - }, - { - "command": "r.helpPanel.back", - "when": "false" - }, - { - "command": "r.helpPanel.forward", - "when": "false" - }, - { - "command": "r.helpPanel.openExternal", - "when": "false" - }, - { - "command": "r.helpPanel.searchPackage", - "when": "false" - }, - { - "command": "r.helpPanel.openInNewPanel", - "when": "false" - }, - { - "command": "r.helpPanel.clearCache", - "when": "false" - }, - { - "command": "r.helpPanel.filterPackages", - "when": "false" - }, - { - "command": "r.helpPanel.removeFromFavorites", - "when": "false" - }, - { - "command": "r.helpPanel.addToFavorites", - "when": "false" - }, - { - "command": "r.helpPanel.showAllPackages", - "when": "false" - }, - { - "command": "r.helpPanel.showOnlyFavorites", - "when": "false" - }, - { - "command": "r.helpPanel.removePackage", - "when": "false" - }, - { - "command": "r.helpPanel.updateInstalledPackages", - "when": "false" - }, - { - "command": "r.helpPanel.updatePackage", - "when": "false" - }, - { - "command": "r.helpPanel.installPackages", - "when": "false" - }, - { - "command": "r.helpPanel.showQuickPick", - "when": "false" - }, - { - "command": "r.helpPanel.summarizeTopics", - "when": "false" - }, - { - "command": "r.helpPanel.unsummarizeTopics", - "when": "false" - }, - { - "command": "r.helpPanel.openForPath", - "when": "false" - }, - { - "command": "r.liveShare.toggle", - "when": "false" - } - ], - "editor/title/run": [ - { - "when": "editorLangId == r", - "command": "r.runSource" - }, - { - "when": "editorLangId == rmd && editorFocus", - "command": "r.knitRmd", - "group": "navigation" - } - ], - "editor/title": [ - { - "command": "r.rmarkdown.preview.openExternal", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@1" - }, - { - "command": "r.rmarkdown.preview.showSource", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@2" - }, - { - "command": "r.rmarkdown.preview.toggleStyle", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@3" - }, - { - "command": "r.rmarkdown.preview.refresh", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@4" - }, - { - "command": "r.rmarkdown.preview.enableAutoRefresh", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && !r.rmarkdown.preview.autoRefresh", - "group": "navigation@5" - }, - { - "command": "r.rmarkdown.preview.disableAutoRefresh", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && r.rmarkdown.preview.autoRefresh", - "group": "navigation@5" - }, - { - "command": "r.browser.refresh", - "when": "resourceScheme =~ /webview/ && r.browser.active", - "group": "navigation" - }, - { - "command": "r.browser.openExternal", - "when": "resourceScheme =~ /webview/ && r.browser.active", - "group": "navigation" - }, - { - "command": "editor.action.webvieweditor.showFind", - "when": "resourceScheme =~ /webview/ && r.browser.active", - "group": "navigation" - }, - { - "command": "editor.action.webvieweditor.showFind", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "command": "r.helpPanel.back", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "command": "r.helpPanel.forward", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "command": "r.helpPanel.openExternal", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.toggleStyle" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.toggleFullWindow" - }, - { - "group": "httpgd", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.togglePreviewPlots" - }, - { - "group": "httpgd", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.exportPlot" - }, - { - "group": "navigation@01", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.prevPlot", - "alt": "r.plot.firstPlot" - }, - { - "group": "navigation@02", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.nextPlot", - "alt": "r.plot.lastPlot" - }, - { - "group": "navigation@03", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.hidePlot", - "alt": "r.plot.closePlot" - }, - { - "group": "navigation@04", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.resetPlots" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.zoomIn", - "alt": "r.plot.zoomOut" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.zoomOut", - "alt": "r.plot.zoomIn" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.openExternal" - }, - { - "group": "httpgd", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.openUrl" - }, - { - "command": "r.rmarkdown.showPreviewToSide", - "alt": "r.rmarkdown.showPreview", - "when": "editorLangId == rmd && editorFocus", - "group": "navigation" - }, - { - "submenu": "r.knitCommands", - "when": "editorLangId == rmd && editorFocus", - "group": "@1" - }, - { - "command": "r.rmarkdown.setKnitDirectory", - "when": "editorLangId == rmd && editorFocus", - "group": "@1" - } - ], - "editor/context": [ - { - "command": "r.helpPanel.openForSelection", - "when": "resourceLangId == r" - }, - { - "command": "r.helpPanel.openForSelection", - "when": "resourceLangId == rmd" - } - ], - "view/item/context": [ - { - "command": "r.workspaceViewer.view", - "group": "inline", - "when": "view == workspaceViewer && viewItem == rootNode" - }, - { - "command": "r.workspaceViewer.remove", - "group": "inline", - "when": "view == workspaceViewer && viewItem == rootNode" - }, - { - "command": "r.helpPanel.searchPackage", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_searchPackage_/" - }, - { - "command": "r.helpPanel.openInNewPanel", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_openInNewPanel_/" - }, - { - "command": "r.helpPanel.clearCache", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_clearCache_/" - }, - { - "command": "r.helpPanel.addToFavorites", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_addToFavorites_/" - }, - { - "command": "r.helpPanel.removeFromFavorites", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_removeFromFavorites_/" - }, - { - "command": "r.helpPanel.showOnlyFavorites", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_showOnlyFavorites_/" - }, - { - "command": "r.helpPanel.showAllPackages", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_showAllPackages_/" - }, - { - "command": "r.helpPanel.removePackage", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_removePackage_/" - }, - { - "command": "r.helpPanel.updateInstalledPackages", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_updateInstalledPackages_/" - }, - { - "command": "r.helpPanel.updatePackage", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_updatePackage_/" - }, - { - "command": "r.helpPanel.installPackages", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_installPackages_/" - }, - { - "command": "r.helpPanel.filterPackages", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_filterPackages_/" - }, - { - "command": "r.helpPanel.showQuickPick", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_QUICKPICK_/" - }, - { - "command": "r.helpPanel.unsummarizeTopics", - "group": "inline@8", - "when": "view == rHelpPages && viewItem =~ /_unsummarizeTopics_/" - }, - { - "command": "r.helpPanel.summarizeTopics", - "group": "inline@8", - "when": "view == rHelpPages && viewItem =~ /_summarizeTopics_/" - }, - { - "command": "r.liveShare.toggle", - "when": "view == rLiveShare" - } - ], - "view/title": [ - { - "command": "r.workspaceViewer.load", - "group": "navigation@0", - "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" - }, - { - "command": "r.workspaceViewer.save", - "group": "navigation@1", - "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" - }, - { - "command": "r.workspaceViewer.clear", - "group": "navigation@2", - "when": "r.WorkspaceViewer:show && view == workspaceViewer" - }, - { - "command": "r.workspaceViewer.refreshEntry", - "group": "navigation@3", - "when": "r.WorkspaceViewer:show && view == workspaceViewer" - }, - { - "command": "r.helpPanel.showQuickPick", - "group": "navigation", - "when": "view == rHelpPages" - }, - { - "command": "r.liveShare.retry", - "group": "navigation@3", - "when": "view == rLiveShare && r.liveShare:aborted" - } - ], - "explorer/context": [ - { - "command": "r.rmarkdown.showPreview", - "when": "resourceLangId == rmd", - "group": "navigation" - } - ], - "r.knitCommands": [ - { - "command": "r.knitRmd" - }, - { - "command": "r.knitRmdToPdf" - }, - { - "command": "r.knitRmdToHtml" - }, - { - "command": "r.knitRmdToAll" - } - ], - "file/newFile": [ - { - "group": "R", - "command": "r.rmarkdown.newFileDraft" - }, - { - "group": "R", - "command": "r.newFileDocument" - } - ] + "engines": { + "vscode": "^1.75.0" }, - "submenus": [ - { - "id": "r.knitCommands", - "label": "R: Knit", - "icon": "$(zap)" - } + "activationEvents": [ + "workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}", + "onCommand:r.runSelectionInActiveTerm", + "onWebviewPanel:rhelp" ], - "configuration": { - "type": "object", - "title": "R", - "properties": { - "r.rpath.windows": { - "type": "string", - "default": "", - "markdownDescription": "Path to an R executable to launch R background processes (Windows). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rpath.mac": { - "type": "string", - "default": "", - "markdownDescription": "Path to an R executable to launch R background processes (macOS). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rpath.linux": { - "type": "string", - "default": "", - "markdownDescription": "Path to an R executable to launch R background processes (Linux). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.windows": { - "type": "string", - "default": "", - "markdownDescription": "R path for interactive terminals (Windows). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.mac": { - "type": "string", - "default": "", - "markdownDescription": "R path for interactive terminals (macOS). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.linux": { - "type": "string", - "default": "", - "markdownDescription": "R path for interactive terminals (Linux). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.option": { - "type": "array", - "default": [ - "--no-save", - "--no-restore" - ], - "description": "R command line options.", - "items": { - "type": "string" - } - }, - "r.libPaths": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "markdownDescription": "Additional library paths to launch R background processes (R languageserver, help server, etc.). These paths will be appended to `.libPaths()` on process startup. It could be useful for projects with [renv](https://rstudio.github.io/renv/index.html) enabled." - }, - "r.useRenvLibPath": { - "type": "boolean", - "default": false, - "markdownDescription": "Use renv library paths to launch R background processes (R languageserver, help server, etc.)." - }, - "r.lsp.enabled": { - "type": "boolean", - "default": true, - "description": "Enable the R language service to provide code analysis features (completion, signature, hover, diagnostics, definition, etc.)" - }, - "r.lsp.args": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "description": "The command line arguments to use when launching R Language Server." - }, - "r.lsp.promptToInstall": { - "type": "boolean", - "default": true, - "description": "Prompt to install R Language Server if it is not installed." - }, - "r.lsp.debug": { - "type": "boolean", - "default": false, - "description": "Debug R Language Server." - }, - "r.lsp.diagnostics": { - "type": "boolean", - "default": true, - "description": "Enable diagnostics." - }, - "r.lsp.lang": { - "type": "string", - "default": "", - "markdownDescription": "Override default `LANG` environment variable." - }, - "r.lsp.use_stdio": { - "type": "boolean", - "default": false, - "description": "Use STDIO connection instead of TCP. (Unix/macOS users only)" - }, - "r.lsp.multiServer": { - "type": "boolean", - "default": true, - "markdownDescription": "Use multiple language servers for [multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces). If disabled, only one language server will be used to handle all requests from all workspaces and files." - }, - "r.rmarkdown.codeLensCommands": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "r.selectCurrentChunk", - "r.runCurrentChunk", - "r.runCurrentChunkAndMove", - "r.runAboveChunks", - "r.runCurrentAndBelowChunks", - "r.runBelowChunks", - "r.runAllChunks", - "r.runPreviousChunk", - "r.runNextChunk", - "r.goToPreviousChunk", - "r.goToNextChunk" + "main": "./dist/extension", + "contributes": { + "terminal": { + "profiles": [ + { + "title": "R Terminal", + "id": "r.terminal-profile" + } ] - }, - "default": [ - "r.runCurrentChunk", - "r.runAboveChunks" - ], - "description": "Customize RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk' shown on the first line of each code chunk. \nCustomize both the commands AND its orders (that is, CodeLens respect user-specified orders):" - }, - "r.rmarkdown.enableCodeLens": { - "type": "boolean", - "default": true, - "markdownDescription": "Enable RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk | Run Above' shown on the first line of each code chunk.\n\n- Click the buttons to run commands.\n- Hover on the buttons to show tooltips.\n- CodeLens commands are customizable via `#r.rmarkdown.codeLensCommands#` or settings.json `r.rmarkdown.codeLensCommands`" - }, - "r.rmarkdown.chunkBackgroundColor": { - "type": "string", - "default": "rgba(128, 128, 128, 0.1)", - "description": "RMarkdown chunk background color in RGBA or RGB value. Defaults to rgba(128, 128, 128, 0.1). Leave it empty to disable it (use default editor background color). Reload VS Code after changing settings.\n\nLearn how to set colors: https://www.w3schools.com/css/css_colors_rgb.asp.\n\nExamples for syntax rgba(, , , ):\nrgba(128, 128, 128, 0.1)\nrgba(128, 128, 128, 0.3)\nrgba(255, 165, 0, 0.1)\n\n" - }, - "r.rmarkdown.preview.autoRefresh": { - "type": "boolean", - "default": true, - "markdownDescription": "Enable automatic refresh of R Markdown preview on file update." - }, - "r.rmarkdown.preview.zoom": { - "type": "number", - "default": 1, - "markdownDescription": "Controls the zoom of the R Markdown preview." - }, - "r.rmarkdown.knit.useBackgroundProcess": { - "type": "boolean", - "default": true, - "markdownDescription": "Should knitting occur in a background process (*smart knitting*), or should it be done in the current R terminal (*manual knitting*)? \n\n*Smart knitting* includes additional features, such as custom knit function detection, R Markdown site detection, progress bars, and the setting knit directory." - }, - "r.rmarkdown.knit.focusOutputChannel": { - "type": "boolean", - "default": true, - "markdownDescription": "Should the R Markdown output channel be focused when knitting?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." - }, - "r.rmarkdown.knit.openOutputFile": { - "type": "boolean", - "default": false, - "markdownDescription": "Should the output file be opened automatically when using knit?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." - }, - "r.rmarkdown.knit.command": { - "type": "string", - "default": "rmarkdown::render", - "markdownDescription": "Command used to knit a Rmd file if not specified by the frontmatter." }, - "r.rmarkdown.knit.defaults.knitWorkingDirectory": { - "type": "string", - "default": "document directory", - "enum": [ - "document directory", - "workspace root" - ], - "enumDescriptions": [ - "Use the document's directory as the knit directory", - "Use the workspace root as the knit directory" - ], - "markdownDescription": "What working directory should R Markdown chunks be evaluated in? Default knit behaviour is to use the document's directory as root.\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`.", - "additionalItems": false, - "additionalProperties": false - }, - "r.helpPanel.enableSyntaxHighlighting": { - "type": "boolean", - "default": true, - "description": "Enable syntax highlighting in the help panel." - }, - "r.helpPanel.cacheIndexFiles": { - "type": "string", - "enum": [ - "None", - "Workspace", - "Global" - ], - "description": "Whether/where to store parsed help indices between sessions.", - "enumDescriptions": [ - "Do not store anything", - "Store on a per workspace basis", - "Store globally" - ], - "default": "None" - }, - "r.helpPanel.previewLocalPackages": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "." - ], - "markdownDescription": "Which local directories to try for local help pages previewer. Set to `[]` to disable." - }, - "r.helpPanel.rpath": { - "type": "string", - "default": "", - "markdownDescription": "DEPRECATED! Path to an R executable. Must be \"vanilla\" R, not radian etc.! Will be read from registry or path if not set.", - "markdownDeprecationMessage": "Will be deprecated. Use `#r.rpath.windows#`, `#r.rpath.mac#`, or `#r.rpath.linux#` instead.", - "deprecationMessage": "Will be deprecated. Use r.rpath.windows, r.rpath.mac, or r.rpath.linux instead." + "viewsContainers": { + "activitybar": [ + { + "id": "workspaceViewer", + "title": "R", + "icon": "./images/Rlogo.svg", + "when": "r.isActive" + } + ] }, - "r.helpPanel.enableHoverLinks": { - "type": "boolean", - "default": true, - "markdownDescription": "Show links to matching help pages in hover" + "views": { + "workspaceViewer": [ + { + "id": "workspaceViewer", + "name": "Workspace", + "icon": "./images/Rlogo.svg", + "contextualTitle": "R" + }, + { + "id": "rHelpPages", + "name": "Help Pages", + "icon": "./images/Rlogo.svg", + "contextualTitle": "R", + "when": "r.helpViewer.show" + }, + { + "id": "rLiveShare", + "name": "Live Share Controls", + "icon": "./images/Rlogo.svg", + "contextualTitle": "R", + "when": "r.WorkspaceViewer:show && !r.liveShare:isGuest", + "visibility": "collapsed" + } + ] }, - "r.helpPanel.clickCodeExamples": { - "type": "object", - "markdownDescription": "What happens when clicking code examples on help pages. Might require restarting to take effect.", - "default": { - "Click": "Copy", - "Ctrl+Click": "Run", - "Shift+Click": "Ignore" - }, - "properties": { - "Click": { - "type": "string", - "default": "Copy", - "enum": [ - "Ignore", - "Copy", - "Run" - ], - "enumDescriptions": [ - "Do nothing", - "Copy the code to the clipboard", - "Run the code in the terminal" - ] - }, - "Ctrl+Click": { - "type": "string", - "default": "Run", - "enum": [ - "Ignore", - "Copy", - "Run" - ], - "enumDescriptions": [ - "Do nothing", - "Copy the code to the clipboard", - "Run the code in the terminal" - ] - }, - "Shift+Click": { - "type": "string", - "default": "Ignore", - "enum": [ - "Ignore", - "Copy", - "Run" - ], - "enumDescriptions": [ - "Do nothing", - "Copy the code to the clipboard", - "Run the code in the terminal" - ] + "viewsWelcome": [ + { + "view": "workspaceViewer", + "when": "!r.WorkspaceViewer:show", + "contents": "R workspace viewer requires that the [session watcher be enabled](https://github.com/REditorSupport/vscode-R/wiki/R-Session-watcher)." + }, + { + "view": "rHelpPages", + "contents": "R Help Pages" + }, + { + "view": "rLiveShare", + "contents": "R Live Share not active.", + "when": "!r.liveShare:aborted" + }, + { + "view": "rLiveShare", + "contents": "Could not connect to Live Share service.", + "when": "r.liveShare:aborted" } - }, - "additionalProperties": false - }, - "r.source.encoding": { - "type": "string", - "default": "UTF-8", - "markdownDescription": "An optional encoding to pass to R when executing the file, i.e. `source(FILE, encoding=ENCODING)`." - }, - "r.source.echo": { - "type": "boolean", - "default": false, - "markdownDescription": "Should the file be executed with echo option set to TRUE by default, i.e. `source(FILE, echo=TRUE)`?" - }, - "r.source.focus": { - "type": "string", - "default": "editor", - "enum": [ - "editor", - "terminal", - "none" - ], - "enumDescriptions": [ - "Focus editor when sending code to terminal", - "Focus terminal when sending code to terminal", - "Do not show terminal when sending code to terminal" - ], - "description": "What to show/focus after sending code to terminal." - }, - "r.alwaysUseActiveTerminal": { - "type": "boolean", - "default": false, - "description": "Use active terminal for all commands, rather than creating a new R terminal." - }, - "r.bracketedPaste": { - "type": "boolean", - "default": false, - "markdownDescription": "Use bracketed paste mode when sending code to terminal. Enable for [radian](https://github.com/randy3k/radian) console." - }, - "r.removeLeadingComments": { - "type": "boolean", - "default": false, - "description": "Remove leading comments when sending code to terminal." - }, - "r.sessionWatcher": { - "type": "boolean", - "default": true, - "description": "Enable R session watcher. Required for workspace viewer and most features to work with an R session. Restart required to take effect." - }, - "r.session.useWebServer": { - "type": "boolean", - "default": false, - "markdownDescription": "Enable experimental use of web server in the R session to handle session requests from the extension. Changes the option `vsc.use_webserver` in R. Requires `#r.sessionWatcher#` to be set to `true`. Requires the `httpuv` R package." - }, - "r.session.watchGlobalEnvironment": { - "type": "boolean", - "default": true, - "markdownDescription": "Watch the global environment to provide hover, autocompletions, and workspace viewer information. Changes the option `vsc.globalenv` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.objectLengthLimit": { - "type": "integer", - "default": 2000, - "markdownDescription": "The upper limit of object length to show object details in workspace viewer and provide session symbol completion. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_length_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.objectTimeout": { - "type": "integer", - "default": 50, - "markdownDescription": "The maximum number of milliseconds to get information of a single object in the global environment. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_timeout` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.levelOfObjectDetail": { - "type": "string", - "markdownDescription": "How much of the object to show on hover, autocompletion, and in the workspace viewer? Changes the option `vsc.str.max.level` in R. Requires `#r.sessionWatcher#` to be set to `true`.", - "default": "Minimal", - "enum": [ - "Minimal", - "Normal", - "Detailed" - ], - "enumDescriptions": [ - "Display literal values and object types only.", - "Display the top level of list content, data frame column values, and example values.", - "Display the top two levels of list content, data frame column values, and example values. This option may cause notable delay after each user input in the terminal." - ] - }, - "r.session.emulateRStudioAPI": { - "type": "boolean", - "default": true, - "markdownDescription": "Emulate the RStudio API for addin support and other {rstudioapi} calls. Changes the option `vsc.rstudioapi` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.data.rowLimit": { - "type": "integer", - "default": 0, - "markdownDescription": "The maximum number of rows to be displayed in the data viewer. `0` means no limit. Changes the option `vsc.row_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.data.pageSize": { - "type": "integer", - "default": 500, - "markdownDescription": "The maximum number of rows per page in the data viewer. `0` means to disable pagination." - }, - "r.session.viewers.viewColumn": { - "type": "object", - "markdownDescription": "Which view column should R-related webviews be displayed? Requires `#r.sessionWatcher#` to be set to `true`.", - "default": { - "plot": "Two", - "browser": "Active", - "viewer": "Two", - "pageViewer": "Active", - "view": "Two", - "helpPanel": "Two" - }, - "properties": { - "plot": { - "type": "string", - "description": "Which view column to show the plot file on graphics update? \n\nChanges the option 'vsc.plot' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display plots in editor group 2.", - "Display plots in the active editor.", - "Display plots beside the active editor.", - "Do not use the VSCode-R plot viewer." - ], - "default": "Two" - }, - "browser": { - "type": "string", - "description": "Which view column to show the WebView triggered by browser (e.g. shiny apps)? \n\nChanges the option 'vsc.browser' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display browser in editor group 2.", - "Display browser in the active editor.", - "Display browser beside the active editor.", - "Do not use the VSCode-R browser." - ], - "default": "Active" - }, - "viewer": { - "type": "string", - "description": "Which view column to show the WebView triggered by viewer (e.g. htmlwidgets)? \n\nChanges the option 'vsc.viewer' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display viewer in editor group 2.", - "Display viewer in the active editor.", - "Display viewer beside the active editor.", - "Do not use the VSCode-R viewer." - ], - "default": "Two" - }, - "pageViewer": { - "type": "string", - "description": "Which view column to show the WebView triggered by the page viewer (e.g. profvis)? \n\nChanges the option 'vsc.page_viewer' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display page viewer in editor group 2.", - "Display page viewer in the active editor.", - "Display page viewer beside the active editor.", - "Do not use the VSCode-R page viewer." - ], - "default": "Active" - }, - "view": { - "type": "string", - "description": "Which view column to show the WebView triggered by View()? \n\nChanges the option 'vsc.view' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display view output in editor group 2.", - "Display view output in the active editor.", - "Display view output beside the active editor.", - "Do not use the VSCode-R view command." - ], - "default": "Two" - }, - "helpPanel": { - "type": "string", - "description": "Which view column to show the WebView triggered by the help panel? \n\nChanges the option 'vsc.help_panel' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display help panel in editor group 2.", - "Display help panel in the active editor.", - "Display help panel beside the active editor.", - "Do not use the VSCode-R help panel." - ], - "default": "Two" + ], + "languages": [ + { + "id": "rd", + "extensions": [ + ".rd" + ], + "aliases": [ + "R documentation", + "r documentation" + ], + "configuration": "./language-configuration/rd.json" + }, + { + "id": "debian-control.r", + "extensions": [ + ".Rproj" + ], + "aliases": [ + "R DCF" + ], + "filenames": [ + "DESCRIPTION", + ".lintr" + ], + "configuration": "./language-configuration/dcf.json" + }, + { + "id": "namespace.r", + "aliases": [ + "R NAMESPACE" + ], + "filenames": [ + "NAMESPACE" + ], + "configuration": "./language-configuration/rnamespace.json" + }, + { + "id": "buildignore.r", + "aliases": [ + "R ignore" + ], + "filenames": [ + ".Rbuildignore" + ], + "configuration": "./language-configuration/rbuildignore.json" } - }, - "additionalProperties": false - }, - "r.rtermSendDelay": { - "type": "integer", - "default": 8, - "markdownDescription": "Delay in milliseconds before sending each line to rterm. Requires `#r.bracketedPaste#` to be `false`." - }, - "r.workspaceViewer.showObjectSize": { - "type": "boolean", - "default": false, - "markdownDescription": "Show object size when hovering over a workspace viewer item. Changes the option `vsc.show_object_size` in R." - }, - "r.workspaceViewer.removeHiddenItems": { - "type": "boolean", - "default": false, - "description": "Remove hidden items when clearing workspace." - }, - "r.workspaceViewer.clearPrompt": { - "type": "boolean", - "default": true, - "description": "Prompt the user for confirmation when clearing the workspace." - }, - "r.liveShare.timeout": { - "type": "integer", - "default": 10000, - "description": "Time in milliseconds before aborting attempt to connect to Live Share API." - }, - "r.liveShare.defaults.commandForward": { - "type": "boolean", - "default": false, - "description": "Default boolean value for guest command forwarding." - }, - "r.liveShare.defaults.shareWorkspace": { - "type": "boolean", - "default": true, - "description": "Default boolean value for sharing the R workspace with guests." - }, - "r.liveShare.defaults.shareBrowser": { - "type": "boolean", - "default": false, - "description": "Default boolean value for automatically sharing R browser ports with guests." - }, - "r.plot.devArgs": { - "type": "object", - "markdownDescription": "The arguments for the png device to replay user graphics to show in VSCode. Requires `#r.plot.useHttpgd#` to be set to `false`. \n\nChanges the option `vsc.dev.args` in R.", - "default": { - "width": 800, - "height": 1200 - }, - "properties": { - "width": { - "type": "number", - "description": "Width of the graphic device.", - "default": 480 - }, - "height": { - "type": "number", - "description": "Height of the graphic device.", - "default": 480 - }, - "units": { - "type": "string", - "default": "px" - }, - "pointsize": { - "type": "number", - "default": 12 - }, - "bg": { - "type": "string", - "default": "white" + ], + "snippets": [ + { + "language": "r", + "path": "./snippets/r-snippets.json" + }, + { + "language": "rd", + "path": "./snippets/r-snippets.json" + }, + { + "language": "rmd", + "path": "./snippets/rmarkdown.json" + } + ], + "grammars": [ + { + "language": "rd", + "scopeName": "text.tex.latex.rd", + "path": "./syntaxes/rd.json" + }, + { + "language": "debian-control.r", + "scopeName": "debian-control.r", + "path": "./syntaxes/dcf.json", + "embeddedLanguages": { + "meta.embedded.block.r": "r" + } + }, + { + "path": "./syntaxes/Rcpp.json", + "scopeName": "comment.block.r", + "injectTo": [ + "source.cpp" + ] + }, + { + "language": "namespace.r", + "scopeName": "namespace.r", + "path": "./syntaxes/rnamespace.json" + }, + { + "language": "buildignore.r", + "scopeName": "buildignore.r", + "path": "./syntaxes/rbuildignore.json" + } + ], + "commands": [ + { + "command": "r.workspaceViewer.refreshEntry", + "title": "Manual Refresh", + "icon": "$(refresh)", + "category": "R Workspace Viewer", + "enablement": "rSessionActive" + }, + { + "command": "r.workspaceViewer.view", + "title": "View", + "icon": "$(open-preview)", + "category": "R Workspace Viewer" + }, + { + "command": "r.workspaceViewer.clear", + "title": "Clear environment", + "icon": "$(clear-all)", + "category": "R Workspace Viewer", + "enablement": "rSessionActive" + }, + { + "command": "r.workspaceViewer.remove", + "title": "Remove", + "icon": "$(close)", + "category": "R Workspace Viewer" + }, + { + "command": "r.workspaceViewer.save", + "title": "Save workspace", + "icon": "$(save)", + "category": "R Workspace Viewer", + "enablement": "rSessionActive" + }, + { + "command": "r.workspaceViewer.load", + "title": "Load workspace", + "icon": "$(folder-opened)", + "category": "R Workspace Viewer" + }, + { + "command": "r.workspaceViewer.package.showQuickPick", + "title": "Show QuickPick", + "category": "R Workspace Viewer" + }, + { + "command": "r.browser.refresh", + "title": "Refresh", + "icon": "$(refresh)", + "category": "R" + }, + { + "command": "r.browser.openExternal", + "title": "Open in external browser", + "icon": "$(link-external)", + "category": "R" + }, + { + "command": "r.showHelp", + "title": "Show help", + "category": "R" + }, + { + "command": "editor.action.webvieweditor.showFind", + "title": "R: Find in WebView", + "icon": "$(search)", + "category": "R" + }, + { + "title": "Create R terminal", + "category": "R", + "command": "r.createRTerm" + }, + { + "title": "Run Source", + "category": "R", + "command": "r.runSource", + "icon": "$(run)" + }, + { + "title": "Knit Rmd", + "category": "R", + "command": "r.knitRmd", + "icon": "$(run-below)" + }, + { + "title": "Knit Rmd To PDF", + "category": "R", + "command": "r.knitRmdToPdf" + }, + { + "title": "Knit Rmd To HTML", + "category": "R", + "command": "r.knitRmdToHtml" + }, + { + "title": "Knit Rmd To All Formats", + "category": "R", + "command": "r.knitRmdToAll" + }, + { + "title": "Run Source with Echo", + "category": "R", + "command": "r.runSourcewithEcho" + }, + { + "title": "Run Selection/Line", + "category": "R", + "command": "r.runSelection" + }, + { + "title": "Show number of rows for selected object", + "category": "R", + "command": "r.nrow" + }, + { + "title": "Show length for a selected object", + "category": "R", + "command": "r.length" + }, + { + "title": "Show first part of a selected object", + "category": "R", + "command": "r.head" + }, + { + "title": "Show first part of a selected object (transposed)", + "category": "R", + "command": "r.thead" + }, + { + "title": "Show names for a selected object", + "category": "R", + "command": "r.names" + }, + { + "title": "View selected object", + "category": "R", + "command": "r.view" + }, + { + "title": "Create gitignore", + "category": "R", + "command": "r.createGitignore" + }, + { + "title": "Create .lintr to the workspace", + "category": "R", + "command": "r.createLintrConfig" + }, + { + "title": "Preview Dataframe", + "category": "R", + "command": "r.previewDataframe" + }, + { + "title": "Preview Environment", + "category": "R", + "command": "r.previewEnvironment" + }, + { + "title": "Load All", + "category": "R Package", + "command": "r.loadAll" + }, + { + "title": "Build", + "category": "R Package", + "command": "r.build" + }, + { + "title": "Build Binary", + "category": "R Package", + "command": "r.buildBinary" + }, + { + "title": "Check", + "category": "R Package", + "command": "r.check" + }, + { + "title": "Document", + "category": "R Package", + "command": "r.document" + }, + { + "title": "Install", + "category": "R Package", + "command": "r.install" + }, + { + "title": "Test", + "category": "R Package", + "command": "r.test" + }, + { + "title": "Generate C/C++ Configuration", + "category": "R Package", + "command": "r.generateCCppProperties" + }, + { + "title": "Attach Active Terminal", + "category": "R", + "command": "r.attachActive" + }, + { + "title": "Run Command With Selection or Word in Terminal", + "category": "R", + "command": "r.runCommandWithSelectionOrWord" + }, + { + "title": "Run Command With Editor Path in Terminal", + "category": "R", + "command": "r.runCommandWithEditorPath" + }, + { + "title": "Run Command in Terminal", + "category": "R", + "command": "r.runCommand" + }, + { + "title": "Run from Beginning to Line", + "category": "R", + "command": "r.runFromBeginningToLine" + }, + { + "title": "Run from Line to End", + "category": "R", + "command": "r.runFromLineToEnd" + }, + { + "title": "Run Selection/Line (Retain Cursor)", + "category": "R", + "command": "r.runSelectionRetainCursor" + }, + { + "title": "Select Current Chunk", + "category": "R", + "command": "r.selectCurrentChunk" + }, + { + "title": "Run Current Chunk", + "category": "R", + "command": "r.runCurrentChunk" + }, + { + "title": "Run Current Chunk and Move to Next Chunk", + "category": "R", + "command": "r.runCurrentChunkAndMove" + }, + { + "title": "Run Previous Chunk", + "category": "R", + "command": "r.runPreviousChunk" + }, + { + "title": "Run Next Chunk", + "category": "R", + "command": "r.runNextChunk" + }, + { + "title": "Run Above Chunks", + "category": "R", + "command": "r.runAboveChunks" + }, + { + "title": "Run Current and Below Chunks", + "category": "R", + "command": "r.runCurrentAndBelowChunks" + }, + { + "title": "Run Below Chunks", + "category": "R", + "command": "r.runBelowChunks" + }, + { + "title": "Run All Chunks", + "category": "R", + "command": "r.runAllChunks" + }, + { + "title": "Go to Previous Chunk", + "category": "R", + "command": "r.goToPreviousChunk" + }, + { + "title": "Go to Next Chunk", + "category": "R", + "command": "r.goToNextChunk" + }, + { + "title": "New Draft", + "category": "R Markdown", + "command": "r.rmarkdown.newDraft" + }, + { + "title": "R Markdown (rmd)", + "category": "R Markdown", + "when": false, + "command": "r.rmarkdown.newFileDraft" + }, + { + "title": "R Document (r)", + "category": "R", + "when": false, + "command": "r.newFileDocument" + }, + { + "command": "r.rmarkdown.setKnitDirectory", + "title": "Set Knit directory", + "icon": "$(zap)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.showPreviewToSide", + "title": "Open Preview to the Side", + "icon": "$(open-preview)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.showPreview", + "title": "Open Preview", + "icon": "$(open-preview)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.preview.refresh", + "title": "Refresh Preview", + "icon": "$(refresh)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.preview.openExternal", + "title": "Open in External Browser", + "icon": "$(link-external)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.preview.showSource", + "title": "Show Source", + "icon": "$(go-to-file)", + "category": "R Markdown" + }, + { + "title": "Toggle Style", + "category": "R Markdown", + "command": "r.rmarkdown.preview.toggleStyle", + "icon": "$(symbol-color)" + }, + { + "title": "Enable Auto Refresh", + "category": "R Markdown", + "command": "r.rmarkdown.preview.enableAutoRefresh", + "icon": "$(sync)" + }, + { + "title": "Disable Auto Refresh", + "category": "R Markdown", + "command": "r.rmarkdown.preview.disableAutoRefresh", + "icon": "$(sync-ignored)" + }, + { + "title": "Launch RStudio Addin", + "category": "R", + "command": "r.launchAddinPicker" + }, + { + "command": "r.helpPanel.back", + "title": "Go Back", + "category": "R Help Panel", + "enablement": "r.helpPanel.canGoBack", + "icon": "$(arrow-left)" + }, + { + "command": "r.helpPanel.forward", + "title": "Go Forward", + "category": "R Help Panel", + "enablement": "r.helpPanel.canGoForward", + "icon": "$(arrow-right)" + }, + { + "command": "r.helpPanel.openExternal", + "title": "Open in external browser", + "category": "R Help Panel", + "enablement": "r.helpPanel.canOpenExternal", + "icon": "$(link-external)" + }, + { + "title": "Search Package Topics", + "category": "R Help Panel", + "command": "r.helpPanel.searchPackage", + "icon": "$(search)" + }, + { + "title": "Open Topic in new Panel", + "category": "R Help Panel", + "command": "r.helpPanel.openInNewPanel", + "icon": "$(add)" + }, + { + "title": "Clear Cached Files", + "category": "R Help Panel", + "command": "r.helpPanel.clearCache", + "icon": "$(refresh)" + }, + { + "title": "Filter Packages", + "category": "R Help Panel", + "command": "r.helpPanel.filterPackages", + "icon": "$(filter)" + }, + { + "title": "Remove from favorites", + "category": "R Help Panel", + "command": "r.helpPanel.removeFromFavorites", + "icon": "$(star-full)" + }, + { + "title": "Add to favorites", + "category": "R Help Panel", + "command": "r.helpPanel.addToFavorites", + "icon": "$(star-empty)" + }, + { + "title": "Show all packages", + "category": "R Help Panel", + "command": "r.helpPanel.showAllPackages", + "icon": "$(star-full)" + }, + { + "title": "Show only favorites", + "category": "R Help Panel", + "command": "r.helpPanel.showOnlyFavorites", + "icon": "$(star-empty)" + }, + { + "title": "Remove Package", + "category": "R Help Panel", + "command": "r.helpPanel.removePackage", + "icon": "$(trash)" + }, + { + "title": "Update Installed Packages", + "category": "R Help Panel", + "command": "r.helpPanel.updateInstalledPackages", + "icon": "$(clone)" + }, + { + "title": "Update/reinstall Package", + "category": "R Help Panel", + "command": "r.helpPanel.updatePackage", + "icon": "$(cloud-download)" + }, + { + "title": "Install multiple packages", + "category": "R Help Panel", + "command": "r.helpPanel.installPackages", + "icon": "$(expand-all)" + }, + { + "title": "Show QuickPick", + "category": "R Help Panel", + "command": "r.helpPanel.showQuickPick", + "icon": "$(zap)" + }, + { + "title": "Summarize Identical Topics", + "category": "R Help Panel", + "command": "r.helpPanel.summarizeTopics", + "icon": "$(fold)" + }, + { + "title": "Don't Summarize Identical Topics", + "category": "R Help Panel", + "command": "r.helpPanel.unsummarizeTopics", + "icon": "$(unfold)" + }, + { + "title": "Open help for selection", + "category": "R Help Panel", + "command": "r.helpPanel.openForSelection" + }, + { + "title": "Open help for path", + "category": "R Help Panel", + "command": "r.helpPanel.openForPath" + }, + { + "command": "r.liveShare.toggle", + "category": "R Live Share", + "title": "Toggle" + }, + { + "command": "r.liveShare.retry", + "title": "Retry connection to Live Share service", + "category": "R Live Share", + "icon": "$(refresh)" + }, + { + "title": "Toggle Style", + "category": "R Plot", + "command": "r.plot.toggleStyle", + "icon": "$(symbol-color)" + }, + { + "title": "Toggle Full Window Mode", + "category": "R Plot", + "command": "r.plot.toggleFullWindow", + "icon": "$(screen-full)" + }, + { + "title": "Toggle Preview Plot Layout", + "category": "R Plot", + "command": "r.plot.togglePreviewPlots", + "icon": "$(list-flat)" + }, + { + "title": "Export Plot", + "category": "R Plot", + "command": "r.plot.exportPlot", + "icon": "$(clone)" + }, + { + "title": "Close Plot", + "category": "R Plot", + "command": "r.plot.closePlot", + "icon": "$(trash)" + }, + { + "title": "Hide Plot", + "category": "R Plot", + "command": "r.plot.hidePlot", + "icon": "$(close)" + }, + { + "title": "Restore Plots", + "category": "R Plot", + "command": "r.plot.resetPlots", + "icon": "$(discard)" + }, + { + "title": "Previous Plot", + "category": "R Plot", + "command": "r.plot.prevPlot", + "enablement": "r.plot.canGoBack", + "icon": "$(chevron-left)" + }, + { + "title": "Next Plot", + "category": "R Plot", + "command": "r.plot.nextPlot", + "enablement": "r.plot.canGoForward", + "icon": "$(chevron-right)" + }, + { + "title": "First Plot", + "category": "R Plot", + "command": "r.plot.firstPlot", + "enablement": "r.plot.canGoBack", + "icon": "$(arrow-left)" + }, + { + "title": "Last Plot", + "category": "R Plot", + "command": "r.plot.lastPlot", + "enablement": "r.plot.canGoForward", + "icon": "$(arrow-right)" + }, + { + "title": "Zoom In", + "category": "R Plot", + "command": "r.plot.zoomIn", + "icon": "$(zoom-in)" + }, + { + "title": "Zoom Out", + "category": "R Plot", + "command": "r.plot.zoomOut", + "icon": "$(zoom-out)" + }, + { + "title": "Show Viewers", + "category": "R Plot", + "command": "r.plot.showViewers", + "icon": "$(versions)" + }, + { + "title": "Open Httpgd Url", + "category": "R Plot", + "command": "r.plot.openUrl", + "icon": "$(link)" + }, + { + "title": "Open in External Browser", + "category": "R Plot", + "command": "r.plot.openExternal", + "icon": "$(link-external)" + } + ], + "keybindings": [ + { + "command": "r.runSelection", + "key": "Ctrl+enter", + "mac": "cmd+enter", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runSelection", + "key": "Ctrl+enter", + "mac": "cmd+enter", + "when": "editorTextFocus && editorLangId == 'rmd'" + }, + { + "command": "r.runSelectionRetainCursor", + "key": "alt+enter", + "mac": "option+enter", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runCurrentChunk", + "key": "Ctrl+shift+enter", + "mac": "cmd+shift+enter", + "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" + }, + { + "command": "r.runAboveChunks", + "key": "Ctrl+alt+p", + "mac": "cmd+alt+p", + "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" + }, + { + "command": "r.runSource", + "key": "shift+Ctrl+s", + "mac": "shift+cmd+s", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.knitRmd", + "key": "shift+Ctrl+k", + "mac": "shift+cmd+k", + "when": "editorTextFocus && editorLangId == 'rmd'" + }, + { + "command": "r.runSourcewithEcho", + "key": "shift+Ctrl+enter", + "mac": "shift+cmd+enter", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runFromBeginningToLine", + "key": "Ctrl+alt+b", + "mac": "cmd+alt+b", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runFromLineToEnd", + "key": "Ctrl+alt+e", + "mac": "cmd+alt+e", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.rmarkdown.showPreviewToSide", + "key": "Ctrl+k v", + "mac": "cmd+k v", + "when": "editorTextFocus && editorLangId == 'rmd'" + }, + { + "command": "r.rmarkdown.showPreview", + "key": "Ctrl+shift+v", + "mac": "cmd+shift+v", + "when": "editorTextFocus && editorLangId == 'rmd'" } - }, - "additionalProperties": false - }, - "r.plot.useHttpgd": { - "type": "boolean", - "default": false, - "markdownDescription": "Use the httpgd-based plot viewer instead of the base VSCode-R plot viewer. Changes the option `vsc.use_httpgd` in R.\n\nRequires the `httpgd` R package version 1.2.0 or later." - }, - "r.plot.defaults.colorTheme": { - "type": "string", - "default": "original", - "enum": [ - "vscode", - "original" - ], - "markdownEnumDescriptions": [ - "Match background and primary stroke color to the current color theme (Or apply custom CSS overwrites, if specified in `#r.plot.customStyleOverwrites#`)", - "Use original colors" - ], - "markdownDescription": "Which color theme to use when launching the httpgd plot viewer." - }, - "r.plot.defaults.plotPreviewLayout": { - "type": "string", - "default": "multirow", - "enum": [ - "multirow", - "scroll", - "hidden" - ], - "enumDescriptions": [ - "Show in multiple rows", - "Show scrollbar", - "Don't show preview plots" - ], - "markdownDescription": "How to display plot previews if more than one row required." - }, - "r.plot.defaults.fullWindowMode": { - "type": "boolean", - "default": false, - "markdownDescription": "Whether to use full window mode when launching the httpgd plot viewer." - }, - "r.plot.timing.resizeInterval": { - "type": "number", - "default": 100, - "markdownDescription": "Interval in ms to wait between plot resizes." - }, - "r.plot.timing.refreshInterval": { - "type": "number", - "default": 10, - "markdownDescription": "Interval in ms to wait between plot refreshs." - }, - "r.plot.customStyleOverwrites": { - "type": "string", - "default": "", - "markdownDescription": "Path to a custom CSS file to be used when `#r.plot.defaults.colorTheme#` is `vscode`. Replaces the default CSS overwrites!" - } - } - }, - "configurationDefaults": { - "[r]": { - "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",<>/" - } - }, - "taskDefinitions": [ - { - "type": "R", - "required": [ - "code" ], - "properties": { - "code": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "x <- 'Hello, World!'", - "print(x)" + "menus": { + "commandPalette": [ + { + "command": "r.workspaceViewer.view", + "when": "false" + }, + { + "command": "r.workspaceViewer.remove", + "when": "false" + }, + { + "command": "r.workspaceViewer.package.showQuickPick", + "when": "false" + }, + { + "command": "r.helpPanel.back", + "when": "false" + }, + { + "command": "r.helpPanel.forward", + "when": "false" + }, + { + "command": "r.helpPanel.openExternal", + "when": "false" + }, + { + "command": "r.helpPanel.searchPackage", + "when": "false" + }, + { + "command": "r.helpPanel.openInNewPanel", + "when": "false" + }, + { + "command": "r.helpPanel.clearCache", + "when": "false" + }, + { + "command": "r.helpPanel.filterPackages", + "when": "false" + }, + { + "command": "r.helpPanel.removeFromFavorites", + "when": "false" + }, + { + "command": "r.helpPanel.addToFavorites", + "when": "false" + }, + { + "command": "r.helpPanel.showAllPackages", + "when": "false" + }, + { + "command": "r.helpPanel.showOnlyFavorites", + "when": "false" + }, + { + "command": "r.helpPanel.removePackage", + "when": "false" + }, + { + "command": "r.helpPanel.updateInstalledPackages", + "when": "false" + }, + { + "command": "r.helpPanel.updatePackage", + "when": "false" + }, + { + "command": "r.helpPanel.installPackages", + "when": "false" + }, + { + "command": "r.helpPanel.showQuickPick", + "when": "false" + }, + { + "command": "r.helpPanel.summarizeTopics", + "when": "false" + }, + { + "command": "r.helpPanel.unsummarizeTopics", + "when": "false" + }, + { + "command": "r.helpPanel.openForPath", + "when": "false" + }, + { + "command": "r.liveShare.toggle", + "when": "false" + } + ], + "editor/title/run": [ + { + "when": "editorLangId == r", + "command": "r.runSource" + }, + { + "when": "editorLangId == rmd && editorFocus", + "command": "r.knitRmd", + "group": "navigation" + } + ], + "editor/title": [ + { + "command": "r.rmarkdown.preview.openExternal", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@1" + }, + { + "command": "r.rmarkdown.preview.showSource", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@2" + }, + { + "command": "r.rmarkdown.preview.toggleStyle", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@3" + }, + { + "command": "r.rmarkdown.preview.refresh", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@4" + }, + { + "command": "r.rmarkdown.preview.enableAutoRefresh", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && !r.rmarkdown.preview.autoRefresh", + "group": "navigation@5" + }, + { + "command": "r.rmarkdown.preview.disableAutoRefresh", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && r.rmarkdown.preview.autoRefresh", + "group": "navigation@5" + }, + { + "command": "r.browser.refresh", + "when": "resourceScheme =~ /webview/ && r.browser.active", + "group": "navigation" + }, + { + "command": "r.browser.openExternal", + "when": "resourceScheme =~ /webview/ && r.browser.active", + "group": "navigation" + }, + { + "command": "editor.action.webvieweditor.showFind", + "when": "resourceScheme =~ /webview/ && r.browser.active", + "group": "navigation" + }, + { + "command": "editor.action.webvieweditor.showFind", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "command": "r.helpPanel.back", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "command": "r.helpPanel.forward", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "command": "r.helpPanel.openExternal", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.toggleStyle" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.toggleFullWindow" + }, + { + "group": "httpgd", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.togglePreviewPlots" + }, + { + "group": "httpgd", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.exportPlot" + }, + { + "group": "navigation@01", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.prevPlot", + "alt": "r.plot.firstPlot" + }, + { + "group": "navigation@02", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.nextPlot", + "alt": "r.plot.lastPlot" + }, + { + "group": "navigation@03", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.hidePlot", + "alt": "r.plot.closePlot" + }, + { + "group": "navigation@04", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.resetPlots" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.zoomIn", + "alt": "r.plot.zoomOut" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.zoomOut", + "alt": "r.plot.zoomIn" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.openExternal" + }, + { + "group": "httpgd", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.openUrl" + }, + { + "command": "r.rmarkdown.showPreviewToSide", + "alt": "r.rmarkdown.showPreview", + "when": "editorLangId == rmd && editorFocus", + "group": "navigation" + }, + { + "submenu": "r.knitCommands", + "when": "editorLangId == rmd && editorFocus", + "group": "@1" + }, + { + "command": "r.rmarkdown.setKnitDirectory", + "when": "editorLangId == rmd && editorFocus", + "group": "@1" + } ], - "description": "R code to be executed" - }, - "options": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "--no-echo", - "--no-restore" + "editor/context": [ + { + "command": "r.helpPanel.openForSelection", + "when": "resourceLangId == r" + }, + { + "command": "r.helpPanel.openForSelection", + "when": "resourceLangId == rmd" + } ], - "description": "Command line options used to invoke R. (see R --help)" - }, - "cwd": { - "type": "string", - "default": "${workspaceRoot}", - "description": "The current working directory of the executed program or shell. If omitted, the current workspace root will be used." - }, - "env": { + "view/item/context": [ + { + "command": "r.workspaceViewer.view", + "group": "inline", + "when": "view == workspaceViewer && viewItem == rootNode" + }, + { + "command": "r.workspaceViewer.remove", + "group": "inline", + "when": "view == workspaceViewer && viewItem == rootNode" + }, + { + "command": "r.helpPanel.searchPackage", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_searchPackage_/" + }, + { + "command": "r.helpPanel.openInNewPanel", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_openInNewPanel_/" + }, + { + "command": "r.helpPanel.clearCache", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_clearCache_/" + }, + { + "command": "r.helpPanel.addToFavorites", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_addToFavorites_/" + }, + { + "command": "r.helpPanel.removeFromFavorites", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_removeFromFavorites_/" + }, + { + "command": "r.helpPanel.showOnlyFavorites", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_showOnlyFavorites_/" + }, + { + "command": "r.helpPanel.showAllPackages", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_showAllPackages_/" + }, + { + "command": "r.helpPanel.removePackage", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_removePackage_/" + }, + { + "command": "r.helpPanel.updateInstalledPackages", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_updateInstalledPackages_/" + }, + { + "command": "r.helpPanel.updatePackage", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_updatePackage_/" + }, + { + "command": "r.helpPanel.installPackages", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_installPackages_/" + }, + { + "command": "r.helpPanel.filterPackages", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_filterPackages_/" + }, + { + "command": "r.helpPanel.showQuickPick", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_QUICKPICK_/" + }, + { + "command": "r.helpPanel.unsummarizeTopics", + "group": "inline@8", + "when": "view == rHelpPages && viewItem =~ /_unsummarizeTopics_/" + }, + { + "command": "r.helpPanel.summarizeTopics", + "group": "inline@8", + "when": "view == rHelpPages && viewItem =~ /_summarizeTopics_/" + }, + { + "command": "r.liveShare.toggle", + "when": "view == rLiveShare" + } + ], + "view/title": [ + { + "command": "r.workspaceViewer.load", + "group": "navigation@0", + "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" + }, + { + "command": "r.workspaceViewer.save", + "group": "navigation@1", + "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" + }, + { + "command": "r.workspaceViewer.clear", + "group": "navigation@2", + "when": "r.WorkspaceViewer:show && view == workspaceViewer" + }, + { + "command": "r.workspaceViewer.refreshEntry", + "group": "navigation@3", + "when": "r.WorkspaceViewer:show && view == workspaceViewer" + }, + { + "command": "r.helpPanel.showQuickPick", + "group": "navigation", + "when": "view == rHelpPages" + }, + { + "command": "r.liveShare.retry", + "group": "navigation@3", + "when": "view == rLiveShare && r.liveShare:aborted" + } + ], + "explorer/context": [ + { + "command": "r.rmarkdown.showPreview", + "when": "resourceLangId == rmd", + "group": "navigation" + } + ], + "r.knitCommands": [ + { + "command": "r.knitRmd" + }, + { + "command": "r.knitRmdToPdf" + }, + { + "command": "r.knitRmdToHtml" + }, + { + "command": "r.knitRmdToAll" + } + ], + "file/newFile": [ + { + "group": "R", + "command": "r.rmarkdown.newFileDraft" + }, + { + "group": "R", + "command": "r.newFileDocument" + } + ] + }, + "submenus": [ + { + "id": "r.knitCommands", + "label": "R: Knit", + "icon": "$(zap)" + } + ], + "configuration": { "type": "object", - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "The environment of the executed program or shell. If omitted, the current process environment will be used." - } - } - } - ], - "problemMatchers": [ - { - "name": "testthat", - "owner": "R", - "severity": "error", - "fileLocation": [ - "relative", - "${workspaceFolder}/tests/testthat" + "title": "R", + "properties": { + "r.rpath.windows": { + "type": "string", + "default": "", + "markdownDescription": "Path to an R executable to launch R background processes (Windows). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rpath.mac": { + "type": "string", + "default": "", + "markdownDescription": "Path to an R executable to launch R background processes (macOS). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rpath.linux": { + "type": "string", + "default": "", + "markdownDescription": "Path to an R executable to launch R background processes (Linux). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.windows": { + "type": "string", + "default": "", + "markdownDescription": "R path for interactive terminals (Windows). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.mac": { + "type": "string", + "default": "", + "markdownDescription": "R path for interactive terminals (macOS). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.linux": { + "type": "string", + "default": "", + "markdownDescription": "R path for interactive terminals (Linux). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.preferRadian": { + "type": "boolean", + "default": false, + "markdownDescription": "Prefer radian over vanilla R when radian is available on PATH. When `false` (default), vanilla R will be used." + }, + "r.rterm.option": { + "type": "array", + "default": [ + "--no-save", + "--no-restore" + ], + "description": "R command line options.", + "items": { + "type": "string" + } + }, + "r.libPaths": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "markdownDescription": "Additional library paths to launch R background processes (R languageserver, help server, etc.). These paths will be appended to `.libPaths()` on process startup. It could be useful for projects with [renv](https://rstudio.github.io/renv/index.html) enabled." + }, + "r.useRenvLibPath": { + "type": "boolean", + "default": false, + "markdownDescription": "Use renv library paths to launch R background processes (R languageserver, help server, etc.)." + }, + "r.lsp.enabled": { + "type": "boolean", + "default": true, + "description": "Enable the R language service to provide code analysis features (completion, signature, hover, diagnostics, definition, etc.)" + }, + "r.lsp.args": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "The command line arguments to use when launching R Language Server." + }, + "r.lsp.promptToInstall": { + "type": "boolean", + "default": true, + "description": "Prompt to install R Language Server if it is not installed." + }, + "r.lsp.debug": { + "type": "boolean", + "default": false, + "description": "Debug R Language Server." + }, + "r.lsp.diagnostics": { + "type": "boolean", + "default": true, + "description": "Enable diagnostics." + }, + "r.lsp.lang": { + "type": "string", + "default": "", + "markdownDescription": "Override default `LANG` environment variable." + }, + "r.lsp.use_stdio": { + "type": "boolean", + "default": false, + "description": "Use STDIO connection instead of TCP. (Unix/macOS users only)" + }, + "r.lsp.multiServer": { + "type": "boolean", + "default": true, + "markdownDescription": "Use multiple language servers for [multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces). If disabled, only one language server will be used to handle all requests from all workspaces and files." + }, + "r.rmarkdown.codeLensCommands": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "r.selectCurrentChunk", + "r.runCurrentChunk", + "r.runCurrentChunkAndMove", + "r.runAboveChunks", + "r.runCurrentAndBelowChunks", + "r.runBelowChunks", + "r.runAllChunks", + "r.runPreviousChunk", + "r.runNextChunk", + "r.goToPreviousChunk", + "r.goToNextChunk" + ] + }, + "default": [ + "r.runCurrentChunk", + "r.runAboveChunks" + ], + "description": "Customize RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk' shown on the first line of each code chunk. \nCustomize both the commands AND its orders (that is, CodeLens respect user-specified orders):" + }, + "r.rmarkdown.enableCodeLens": { + "type": "boolean", + "default": true, + "markdownDescription": "Enable RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk | Run Above' shown on the first line of each code chunk.\n\n- Click the buttons to run commands.\n- Hover on the buttons to show tooltips.\n- CodeLens commands are customizable via `#r.rmarkdown.codeLensCommands#` or settings.json `r.rmarkdown.codeLensCommands`" + }, + "r.rmarkdown.chunkBackgroundColor": { + "type": "string", + "default": "rgba(128, 128, 128, 0.1)", + "description": "RMarkdown chunk background color in RGBA or RGB value. Defaults to rgba(128, 128, 128, 0.1). Leave it empty to disable it (use default editor background color). Reload VS Code after changing settings.\n\nLearn how to set colors: https://www.w3schools.com/css/css_colors_rgb.asp.\n\nExamples for syntax rgba(, , , ):\nrgba(128, 128, 128, 0.1)\nrgba(128, 128, 128, 0.3)\nrgba(255, 165, 0, 0.1)\n\n" + }, + "r.rmarkdown.preview.autoRefresh": { + "type": "boolean", + "default": true, + "markdownDescription": "Enable automatic refresh of R Markdown preview on file update." + }, + "r.rmarkdown.preview.zoom": { + "type": "number", + "default": 1, + "markdownDescription": "Controls the zoom of the R Markdown preview." + }, + "r.rmarkdown.knit.useBackgroundProcess": { + "type": "boolean", + "default": true, + "markdownDescription": "Should knitting occur in a background process (*smart knitting*), or should it be done in the current R terminal (*manual knitting*)? \n\n*Smart knitting* includes additional features, such as custom knit function detection, R Markdown site detection, progress bars, and the setting knit directory." + }, + "r.rmarkdown.knit.focusOutputChannel": { + "type": "boolean", + "default": true, + "markdownDescription": "Should the R Markdown output channel be focused when knitting?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." + }, + "r.rmarkdown.knit.openOutputFile": { + "type": "boolean", + "default": false, + "markdownDescription": "Should the output file be opened automatically when using knit?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." + }, + "r.rmarkdown.knit.command": { + "type": "string", + "default": "rmarkdown::render", + "markdownDescription": "Command used to knit a Rmd file if not specified by the frontmatter." + }, + "r.rmarkdown.knit.defaults.knitWorkingDirectory": { + "type": "string", + "default": "document directory", + "enum": [ + "document directory", + "workspace root" + ], + "enumDescriptions": [ + "Use the document's directory as the knit directory", + "Use the workspace root as the knit directory" + ], + "markdownDescription": "What working directory should R Markdown chunks be evaluated in? Default knit behaviour is to use the document's directory as root.\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`.", + "additionalItems": false, + "additionalProperties": false + }, + "r.helpPanel.enableSyntaxHighlighting": { + "type": "boolean", + "default": true, + "description": "Enable syntax highlighting in the help panel." + }, + "r.helpPanel.cacheIndexFiles": { + "type": "string", + "enum": [ + "None", + "Workspace", + "Global" + ], + "description": "Whether/where to store parsed help indices between sessions.", + "enumDescriptions": [ + "Do not store anything", + "Store on a per workspace basis", + "Store globally" + ], + "default": "None" + }, + "r.helpPanel.previewLocalPackages": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "." + ], + "markdownDescription": "Which local directories to try for local help pages previewer. Set to `[]` to disable." + }, + "r.helpPanel.rpath": { + "type": "string", + "default": "", + "markdownDescription": "DEPRECATED! Path to an R executable. Must be \"vanilla\" R, not radian etc.! Will be read from registry or path if not set.", + "markdownDeprecationMessage": "Will be deprecated. Use `#r.rpath.windows#`, `#r.rpath.mac#`, or `#r.rpath.linux#` instead.", + "deprecationMessage": "Will be deprecated. Use r.rpath.windows, r.rpath.mac, or r.rpath.linux instead." + }, + "r.helpPanel.enableHoverLinks": { + "type": "boolean", + "default": true, + "markdownDescription": "Show links to matching help pages in hover" + }, + "r.helpPanel.clickCodeExamples": { + "type": "object", + "markdownDescription": "What happens when clicking code examples on help pages. Might require restarting to take effect.", + "default": { + "Click": "Copy", + "Ctrl+Click": "Run", + "Shift+Click": "Ignore" + }, + "properties": { + "Click": { + "type": "string", + "default": "Copy", + "enum": [ + "Ignore", + "Copy", + "Run" + ], + "enumDescriptions": [ + "Do nothing", + "Copy the code to the clipboard", + "Run the code in the terminal" + ] + }, + "Ctrl+Click": { + "type": "string", + "default": "Run", + "enum": [ + "Ignore", + "Copy", + "Run" + ], + "enumDescriptions": [ + "Do nothing", + "Copy the code to the clipboard", + "Run the code in the terminal" + ] + }, + "Shift+Click": { + "type": "string", + "default": "Ignore", + "enum": [ + "Ignore", + "Copy", + "Run" + ], + "enumDescriptions": [ + "Do nothing", + "Copy the code to the clipboard", + "Run the code in the terminal" + ] + } + }, + "additionalProperties": false + }, + "r.source.encoding": { + "type": "string", + "default": "UTF-8", + "markdownDescription": "An optional encoding to pass to R when executing the file, i.e. `source(FILE, encoding=ENCODING)`." + }, + "r.source.echo": { + "type": "boolean", + "default": false, + "markdownDescription": "Should the file be executed with echo option set to TRUE by default, i.e. `source(FILE, echo=TRUE)`?" + }, + "r.source.focus": { + "type": "string", + "default": "editor", + "enum": [ + "editor", + "terminal", + "none" + ], + "enumDescriptions": [ + "Focus editor when sending code to terminal", + "Focus terminal when sending code to terminal", + "Do not show terminal when sending code to terminal" + ], + "description": "What to show/focus after sending code to terminal." + }, + "r.alwaysUseActiveTerminal": { + "type": "boolean", + "default": false, + "description": "Use active terminal for all commands, rather than creating a new R terminal." + }, + "r.bracketedPaste": { + "type": "boolean", + "default": false, + "markdownDescription": "Use bracketed paste mode when sending code to terminal. Enable for [radian](https://github.com/randy3k/radian) console." + }, + "r.removeLeadingComments": { + "type": "boolean", + "default": false, + "description": "Remove leading comments when sending code to terminal." + }, + "r.sessionWatcher": { + "type": "boolean", + "default": true, + "description": "Enable R session watcher. Required for workspace viewer and most features to work with an R session. Restart required to take effect." + }, + "r.session.useWebServer": { + "type": "boolean", + "default": false, + "markdownDescription": "Enable experimental use of web server in the R session to handle session requests from the extension. Changes the option `vsc.use_webserver` in R. Requires `#r.sessionWatcher#` to be set to `true`. Requires the `httpuv` R package." + }, + "r.session.watchGlobalEnvironment": { + "type": "boolean", + "default": true, + "markdownDescription": "Watch the global environment to provide hover, autocompletions, and workspace viewer information. Changes the option `vsc.globalenv` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.objectLengthLimit": { + "type": "integer", + "default": 2000, + "markdownDescription": "The upper limit of object length to show object details in workspace viewer and provide session symbol completion. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_length_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.objectTimeout": { + "type": "integer", + "default": 50, + "markdownDescription": "The maximum number of milliseconds to get information of a single object in the global environment. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_timeout` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.levelOfObjectDetail": { + "type": "string", + "default": "Minimal", + "markdownDescription": "How much of the object to show on hover, autocompletion, and in the workspace viewer? Changes the option `vsc.str.max.level` in R. Requires `#r.sessionWatcher#` to be set to `true`.", + "enum": [ + "Minimal", + "Normal", + "Detailed" + ], + "enumDescriptions": [ + "Display literal values and object types only.", + "Display the top level of list content, data frame column values, and example values.", + "Display the top two levels of list content, data frame column values, and example values. This option may cause notable delay after each user input in the terminal." + ] + }, + "r.session.emulateRStudioAPI": { + "type": "boolean", + "default": true, + "markdownDescription": "Emulate the RStudio API for addin support and other {rstudioapi} calls. Changes the option `vsc.rstudioapi` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.data.rowLimit": { + "type": "integer", + "default": 0, + "markdownDescription": "The maximum number of rows to be displayed in the data viewer. `0` means no limit. Changes the option `vsc.row_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.data.pageSize": { + "type": "integer", + "default": 500, + "markdownDescription": "The maximum number of rows per page in the data viewer. `0` means to disable pagination." + }, + "r.session.viewers.viewColumn": { + "type": "object", + "markdownDescription": "Which view column should R-related webviews be displayed? Requires `#r.sessionWatcher#` to be set to `true`.", + "default": { + "plot": "Two", + "browser": "Active", + "viewer": "Two", + "pageViewer": "Active", + "view": "Two", + "helpPanel": "Two" + }, + "properties": { + "plot": { + "type": "string", + "description": "Which view column to show the plot file on graphics update? \n\nChanges the option 'vsc.plot' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display plots in editor group 2.", + "Display plots in the active editor.", + "Display plots beside the active editor.", + "Do not use the VSCode-R plot viewer." + ], + "default": "Two" + }, + "browser": { + "type": "string", + "description": "Which view column to show the WebView triggered by browser (e.g. shiny apps)? \n\nChanges the option 'vsc.browser' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display browser in editor group 2.", + "Display browser in the active editor.", + "Display browser beside the active editor.", + "Do not use the VSCode-R browser." + ], + "default": "Active" + }, + "viewer": { + "type": "string", + "description": "Which view column to show the WebView triggered by viewer (e.g. htmlwidgets)? \n\nChanges the option 'vsc.viewer' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display viewer in editor group 2.", + "Display viewer in the active editor.", + "Display viewer beside the active editor.", + "Do not use the VSCode-R viewer." + ], + "default": "Two" + }, + "pageViewer": { + "type": "string", + "description": "Which view column to show the WebView triggered by the page viewer (e.g. profvis)? \n\nChanges the option 'vsc.page_viewer' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display page viewer in editor group 2.", + "Display page viewer in the active editor.", + "Display page viewer beside the active editor.", + "Do not use the VSCode-R page viewer." + ], + "default": "Active" + }, + "view": { + "type": "string", + "description": "Which view column to show the WebView triggered by View()? \n\nChanges the option 'vsc.view' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display view output in editor group 2.", + "Display view output in the active editor.", + "Display view output beside the active editor.", + "Do not use the VSCode-R view command." + ], + "default": "Two" + }, + "helpPanel": { + "type": "string", + "description": "Which view column to show the WebView triggered by the help panel? \n\nChanges the option 'vsc.help_panel' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display help panel in editor group 2.", + "Display help panel in the active editor.", + "Display help panel beside the active editor.", + "Do not use the VSCode-R help panel." + ], + "default": "Two" + } + }, + "additionalProperties": false + }, + "r.rtermSendDelay": { + "type": "integer", + "default": 8, + "markdownDescription": "Delay in milliseconds before sending each line to rterm. Requires `#r.bracketedPaste#` to be `false`." + }, + "r.workspaceViewer.showObjectSize": { + "type": "boolean", + "default": false, + "markdownDescription": "Show object size when hovering over a workspace viewer item. Changes the option `vsc.show_object_size` in R." + }, + "r.workspaceViewer.removeHiddenItems": { + "type": "boolean", + "default": false, + "description": "Remove hidden items when clearing workspace." + }, + "r.workspaceViewer.clearPrompt": { + "type": "boolean", + "default": true, + "description": "Prompt the user for confirmation when clearing the workspace." + }, + "r.liveShare.timeout": { + "type": "integer", + "default": 10000, + "description": "Time in milliseconds before aborting attempt to connect to Live Share API." + }, + "r.liveShare.defaults.commandForward": { + "type": "boolean", + "default": false, + "description": "Default boolean value for guest command forwarding." + }, + "r.liveShare.defaults.shareWorkspace": { + "type": "boolean", + "default": true, + "description": "Default boolean value for sharing the R workspace with guests." + }, + "r.liveShare.defaults.shareBrowser": { + "type": "boolean", + "default": false, + "description": "Default boolean value for automatically sharing R browser ports with guests." + }, + "r.plot.devArgs": { + "type": "object", + "markdownDescription": "The arguments for the png device to replay user graphics to show in VSCode. Requires `#r.plot.useHttpgd#` to be set to `false`. \n\nChanges the option `vsc.dev.args` in R.", + "default": { + "width": 800, + "height": 1200 + }, + "properties": { + "width": { + "type": "number", + "description": "Width of the graphic device.", + "default": 480 + }, + "height": { + "type": "number", + "description": "Height of the graphic device.", + "default": 480 + }, + "units": { + "type": "string", + "default": "px" + }, + "pointsize": { + "type": "number", + "default": 12 + }, + "bg": { + "type": "string", + "default": "white" + } + }, + "additionalProperties": false + }, + "r.plot.useHttpgd": { + "type": "boolean", + "default": false, + "markdownDescription": "Use the httpgd-based plot viewer instead of the base VSCode-R plot viewer. Changes the option `vsc.use_httpgd` in R.\n\nRequires the `httpgd` R package version 1.2.0 or later." + }, + "r.plot.defaults.colorTheme": { + "type": "string", + "default": "original", + "enum": [ + "vscode", + "original" + ], + "markdownEnumDescriptions": [ + "Match background and primary stroke color to the current color theme (Or apply custom CSS overwrites, if specified in `#r.plot.customStyleOverwrites#`)", + "Use original colors" + ], + "markdownDescription": "Which color theme to use when launching the httpgd plot viewer." + }, + "r.plot.defaults.plotPreviewLayout": { + "type": "string", + "default": "multirow", + "enum": [ + "multirow", + "scroll", + "hidden" + ], + "enumDescriptions": [ + "Show in multiple rows", + "Show scrollbar", + "Don't show preview plots" + ], + "markdownDescription": "How to display plot previews if more than one row required." + }, + "r.plot.defaults.fullWindowMode": { + "type": "boolean", + "default": false, + "markdownDescription": "Whether to use full window mode when launching the httpgd plot viewer." + }, + "r.plot.timing.resizeInterval": { + "type": "number", + "default": 100, + "markdownDescription": "Interval in ms to wait between plot resizes." + }, + "r.plot.timing.refreshInterval": { + "type": "number", + "default": 10, + "markdownDescription": "Interval in ms to wait between plot refreshs." + }, + "r.plot.customStyleOverwrites": { + "type": "string", + "default": "", + "markdownDescription": "Path to a custom CSS file to be used when `#r.plot.defaults.colorTheme#` is `vscode`. Replaces the default CSS overwrites!" + } + } + }, + "configurationDefaults": { + "[r]": { + "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",<>/" + } + }, + "taskDefinitions": [ + { + "type": "R", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "x <- 'Hello, World!'", + "print(x)" + ], + "description": "R code to be executed" + }, + "options": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "--no-echo", + "--no-restore" + ], + "description": "Command line options used to invoke R. (see R --help)" + }, + "cwd": { + "type": "string", + "default": "${workspaceRoot}", + "description": "The current working directory of the executed program or shell. If omitted, the current workspace root will be used." + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "The environment of the executed program or shell. If omitted, the current process environment will be used." + } + } + } ], - "pattern": [ - { - "regexp": "^[-─ ]*(Failure|Error)\\s\\((.*\\.[Rr]):(\\d+):?(\\d+)?\\):\\s(.*)", - "file": 2, - "line": 3, - "column": 4, - "message": 5 - }, - { - "regexp": "^(.*)$", - "message": 1 - } + "problemMatchers": [ + { + "name": "testthat", + "owner": "R", + "severity": "error", + "fileLocation": [ + "relative", + "${workspaceFolder}/tests/testthat" + ], + "pattern": [ + { + "regexp": "^[-─ ]*(Failure|Error)\\s\\((.*\\.[Rr]):(\\d+):?(\\d+)?\\):\\s(.*)", + "file": 2, + "line": 3, + "column": 4, + "message": 5 + }, + { + "regexp": "^(.*)$", + "message": 1 + } + ] + } ] - } + }, + "scripts": { + "vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production", + "changelog": "npx git-cliff v2.8.5.. -o", + "build": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none", + "watch": "webpack --mode none --watch", + "watchHelp": "tsc -p ./html/help --watch", + "watchHttpgd": "tsc -p ./html/httpgd --watch", + "pretest": "tsc -p ./", + "test": "node ./out/test/runTest.js", + "lint": "eslint src --ext ts" + }, + "devDependencies": { + "@types/cheerio": "^0.22.29", + "@types/ejs": "^3.0.6", + "@types/express": "^4.17.12", + "@types/fs-extra": "^9.0.11", + "@types/glob": "^8.0.0", + "@types/highlight.js": "^10.1.0", + "@types/js-yaml": "^4.0.2", + "@types/mocha": "^8.2.2", + "@types/node": "^18.17.1", + "@types/node-fetch": "^2.5.10", + "@types/sinon": "^10.0.13", + "@types/vscode": "^1.75.0", + "@types/winreg": "^1.2.31", + "@typescript-eslint/eslint-plugin": "^5.30.0", + "@typescript-eslint/parser": "^5.30.0", + "@vscode/test-electron": "^2.2.3", + "copy-webpack-plugin": "^9.0.0", + "eslint": "^7.28.0", + "eslint-plugin-jsdoc": "^35.1.3", + "git-cliff": "^2.8.0", + "mocha": "^11.1.0", + "sinon": "^15.0.1", + "ts-loader": "^9.3.1", + "typescript": "^4.7.2", + "webpack": "^5.99.6", + "webpack-cli": "^4.10.0" + }, + "dependencies": { + "ag-grid-community": "^31.3.2", + "cheerio": "1.0.0-rc.12", + "crypto": "^1.0.1", + "ejs": "^3.1.10", + "fs-extra": "^10.0.0", + "highlight.js": "^11.9.0", + "httpgd": "0.1.6", + "jquery": "^3.7.1", + "jquery.json-viewer": "^1.5.0", + "js-yaml": "^4.1.0", + "node-fetch": "^2.6.7", + "vscode-languageclient": "^9.0.1", + "vsls": "^1.0.4753", + "winreg": "^1.2.4" + }, + "extensionDependencies": [ + "REditorSupport.r-syntax" ] - }, - "scripts": { - "vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production", - "changelog": "npx git-cliff v2.8.5.. -o", - "build": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none", - "watch": "webpack --mode none --watch", - "watchHelp": "tsc -p ./html/help --watch", - "watchHttpgd": "tsc -p ./html/httpgd --watch", - "pretest": "tsc -p ./", - "test": "node ./out/test/runTest.js", - "lint": "eslint src --ext ts" - }, - "devDependencies": { - "@types/cheerio": "^0.22.29", - "@types/ejs": "^3.0.6", - "@types/express": "^4.17.12", - "@types/fs-extra": "^9.0.11", - "@types/glob": "^8.0.0", - "@types/highlight.js": "^10.1.0", - "@types/js-yaml": "^4.0.2", - "@types/mocha": "^8.2.2", - "@types/node": "^18.17.1", - "@types/node-fetch": "^2.5.10", - "@types/sinon": "^10.0.13", - "@types/vscode": "^1.75.0", - "@types/winreg": "^1.2.31", - "@typescript-eslint/eslint-plugin": "^5.30.0", - "@typescript-eslint/parser": "^5.30.0", - "@vscode/test-electron": "^2.2.3", - "copy-webpack-plugin": "^9.0.0", - "eslint": "^7.28.0", - "eslint-plugin-jsdoc": "^35.1.3", - "git-cliff": "^2.8.0", - "mocha": "^11.1.0", - "sinon": "^15.0.1", - "ts-loader": "^9.3.1", - "typescript": "^4.7.2", - "webpack": "^5.99.6", - "webpack-cli": "^4.10.0" - }, - "dependencies": { - "ag-grid-community": "^31.3.2", - "cheerio": "1.0.0-rc.12", - "crypto": "^1.0.1", - "ejs": "^3.1.10", - "fs-extra": "^10.0.0", - "highlight.js": "^11.9.0", - "httpgd": "0.1.6", - "jquery": "^3.7.1", - "jquery.json-viewer": "^1.5.0", - "js-yaml": "^4.1.0", - "node-fetch": "^2.6.7", - "vscode-languageclient": "^9.0.1", - "vsls": "^1.0.4753", - "winreg": "^1.2.4" - }, - "extensionDependencies": [ - "REditorSupport.r-syntax" - ] -} +} \ No newline at end of file diff --git a/src/util.ts b/src/util.ts index b4e280af..37ba0b5f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -41,7 +41,7 @@ export function substituteVariables(str: string): string { return result; } -function getRfromEnvPath(platform: string) { +function getRfromEnvPath(platform: string, executableName: string = 'R') { let splitChar = ':'; let fileExtension = ''; @@ -52,7 +52,7 @@ function getRfromEnvPath(platform: string) { const os_paths: string[] | string = process.env.PATH ? process.env.PATH.split(splitChar) : []; for (const os_path of os_paths) { - const os_r_path: string = path.join(os_path, 'R' + fileExtension); + const os_r_path: string = path.join(os_path, executableName + fileExtension); if (fs.existsSync(os_r_path)) { return os_r_path; } @@ -67,7 +67,7 @@ export async function getRpathFromSystem(): Promise { rpath ||= getRfromEnvPath(platform); - if ( !rpath && platform === 'win32') { + if (!rpath && platform === 'win32') { // Find path from registry try { const key = new winreg({ @@ -135,6 +135,21 @@ export async function getRterm(): Promise { const configEntry = getRPathConfigEntry(true); let rpath = config().get(configEntry); rpath &&= substituteVariables(rpath); + + if (!rpath) { + const platform: string = process.platform; + const preferRadian = config().get('rterm.preferRadian', false); + + if (preferRadian) { + // Try radian first, then fall back to R + rpath = getRfromEnvPath(platform, 'radian') || getRfromEnvPath(platform, 'R'); + } else { + // Try R + rpath = getRfromEnvPath(platform, 'R'); + } + } + + // Fall back to system R path if still not found rpath ||= await getRpathFromSystem(); if (rpath !== '') { @@ -254,8 +269,8 @@ export async function executeAsTask(name: string, command: string, args?: string export async function executeAsTask(name: string, cmdOrProcess: string, args?: string[], asProcess: boolean = false): Promise { let taskDefinition: vscode.TaskDefinition; let taskExecution: vscode.ShellExecution | vscode.ProcessExecution; - if(asProcess){ - taskDefinition = { type: 'process'}; + if (asProcess) { + taskDefinition = { type: 'process' }; taskExecution = args ? new vscode.ProcessExecution( cmdOrProcess, args @@ -633,7 +648,7 @@ export function readFileSyncSafe( encoding: BufferEncoding = 'utf-8' ): string | undefined { try { - return fs.readFileSync(path, {encoding:encoding}); + return fs.readFileSync(path, { encoding: encoding }); } catch (e) { return undefined; } @@ -643,9 +658,9 @@ export function readFileSyncSafe( export function readdirSyncSafe( path: fs.PathLike, encoding: BufferEncoding = 'utf-8' -){ +) { try { - return fs.readdirSync(path, {encoding: encoding}); + return fs.readdirSync(path, { encoding: encoding }); } catch (e) { return undefined; } @@ -668,7 +683,7 @@ export function isFileSafe(path: fs.PathLike): boolean { } // Keeps only the unique entries in an array, optionally with a custom comparison function -export function uniqueEntries(array: T[], isIdentical: (x: T, y: T) => boolean = (x, y) => (x === y)){ +export function uniqueEntries(array: T[], isIdentical: (x: T, y: T) => boolean = (x, y) => (x === y)) { function uniqueFunction(v: T, index: number, array: T[]): boolean { return array.findIndex(v2 => isIdentical(v2, v)) === index; } From 13632113931356c254b4d076f52a3e0f0ea70cf5 Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Fri, 11 Jul 2025 17:10:22 +0200 Subject: [PATCH 2/3] Minimize diff size by removing unnecessary whitespace changes. --- README.md | 2 +- package.json | 2 +- src/util.ts | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f780fd45..c891f2bb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Go to the [wiki](https://github.com/REditorSupport/vscode-R/wiki) to view the do The following software or extensions are recommended to enhance the experience of using R in VS Code: -* [radian](https://github.com/randy3k/radian): A modern R console that corrects many limitations of the official R terminal and supports many features such as syntax highlighting and auto-completion. By default, the extension will use vanilla R if available. To prefer radian, set `r.rterm.preferRadian` to `true`. +* [radian](https://github.com/randy3k/radian): A modern R console that corrects many limitations of the official R terminal and supports many features such as syntax highlighting and auto-completion. By default, the extension will use vanilla R. To prefer radian, set `r.rterm.preferRadian` to `true`. * [VSCode-R-Debugger](https://github.com/ManuelHentschel/VSCode-R-Debugger): A VS Code extension to support R debugging capabilities. diff --git a/package.json b/package.json index 9d43da27..09e6ec0b 100644 --- a/package.json +++ b/package.json @@ -1639,8 +1639,8 @@ }, "r.session.levelOfObjectDetail": { "type": "string", - "default": "Minimal", "markdownDescription": "How much of the object to show on hover, autocompletion, and in the workspace viewer? Changes the option `vsc.str.max.level` in R. Requires `#r.sessionWatcher#` to be set to `true`.", + "default": "Minimal", "enum": [ "Minimal", "Normal", diff --git a/src/util.ts b/src/util.ts index 37ba0b5f..38b86539 100644 --- a/src/util.ts +++ b/src/util.ts @@ -269,8 +269,8 @@ export async function executeAsTask(name: string, command: string, args?: string export async function executeAsTask(name: string, cmdOrProcess: string, args?: string[], asProcess: boolean = false): Promise { let taskDefinition: vscode.TaskDefinition; let taskExecution: vscode.ShellExecution | vscode.ProcessExecution; - if (asProcess) { - taskDefinition = { type: 'process' }; + if(asProcess){ + taskDefinition = { type: 'process'}; taskExecution = args ? new vscode.ProcessExecution( cmdOrProcess, args @@ -648,7 +648,7 @@ export function readFileSyncSafe( encoding: BufferEncoding = 'utf-8' ): string | undefined { try { - return fs.readFileSync(path, { encoding: encoding }); + return fs.readFileSync(path, {encoding:encoding}); } catch (e) { return undefined; } @@ -658,9 +658,9 @@ export function readFileSyncSafe( export function readdirSyncSafe( path: fs.PathLike, encoding: BufferEncoding = 'utf-8' -) { +){ try { - return fs.readdirSync(path, { encoding: encoding }); + return fs.readdirSync(path, {encoding: encoding}); } catch (e) { return undefined; } @@ -683,7 +683,7 @@ export function isFileSafe(path: fs.PathLike): boolean { } // Keeps only the unique entries in an array, optionally with a custom comparison function -export function uniqueEntries(array: T[], isIdentical: (x: T, y: T) => boolean = (x, y) => (x === y)) { +export function uniqueEntries(array: T[], isIdentical: (x: T, y: T) => boolean = (x, y) => (x === y)){ function uniqueFunction(v: T, index: number, array: T[]): boolean { return array.findIndex(v2 => isIdentical(v2, v)) === index; } From 89552903a20e544491e8b5551451211c8553e1ee Mon Sep 17 00:00:00 2001 From: Jonathan Berrisch Date: Fri, 11 Jul 2025 17:23:18 +0200 Subject: [PATCH 3/3] Minimize diff (package.json) --- package.json | 4055 +++++++++++++++++++++++++------------------------- 1 file changed, 2028 insertions(+), 2027 deletions(-) diff --git a/package.json b/package.json index 09e6ec0b..8d184a2d 100644 --- a/package.json +++ b/package.json @@ -1,2048 +1,2049 @@ { - "name": "r", - "displayName": "R", - "description": "R Extension for Visual Studio Code", - "version": "2.8.6", - "author": "REditorSupport", - "license": "SEE LICENSE IN LICENSE", - "publisher": "REditorSupport", - "icon": "images/Rlogo.png", - "repository": { - "type": "git", - "url": "https://github.com/REditorSupport/vscode-R" + "name": "r", + "displayName": "R", + "description": "R Extension for Visual Studio Code", + "version": "2.8.6", + "author": "REditorSupport", + "license": "SEE LICENSE IN LICENSE", + "publisher": "REditorSupport", + "icon": "images/Rlogo.png", + "repository": { + "type": "git", + "url": "https://github.com/REditorSupport/vscode-R" + }, + "bugs": { + "url": "https://github.com/REditorSupport/vscode-R/issues" + }, + "categories": [ + "Programming Languages", + "Snippets", + "Other" + ], + "keywords": [ + "R", + "R language", + "R documentation", + "R Markdown" + ], + "engines": { + "vscode": "^1.75.0" + }, + "activationEvents": [ + "workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}", + "onCommand:r.runSelectionInActiveTerm", + "onWebviewPanel:rhelp" + ], + "main": "./dist/extension", + "contributes": { + "terminal": { + "profiles": [ + { + "title": "R Terminal", + "id": "r.terminal-profile" + } + ] }, - "bugs": { - "url": "https://github.com/REditorSupport/vscode-R/issues" + "viewsContainers": { + "activitybar": [ + { + "id": "workspaceViewer", + "title": "R", + "icon": "./images/Rlogo.svg", + "when": "r.isActive" + } + ] }, - "categories": [ - "Programming Languages", - "Snippets", - "Other" - ], - "keywords": [ - "R", - "R language", - "R documentation", - "R Markdown" - ], - "engines": { - "vscode": "^1.75.0" - }, - "activationEvents": [ - "workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}", - "onCommand:r.runSelectionInActiveTerm", - "onWebviewPanel:rhelp" - ], - "main": "./dist/extension", - "contributes": { - "terminal": { - "profiles": [ - { - "title": "R Terminal", - "id": "r.terminal-profile" - } - ] + "views": { + "workspaceViewer": [ + { + "id": "workspaceViewer", + "name": "Workspace", + "icon": "./images/Rlogo.svg", + "contextualTitle": "R" }, - "viewsContainers": { - "activitybar": [ - { - "id": "workspaceViewer", - "title": "R", - "icon": "./images/Rlogo.svg", - "when": "r.isActive" - } - ] - }, - "views": { - "workspaceViewer": [ - { - "id": "workspaceViewer", - "name": "Workspace", - "icon": "./images/Rlogo.svg", - "contextualTitle": "R" - }, - { - "id": "rHelpPages", - "name": "Help Pages", - "icon": "./images/Rlogo.svg", - "contextualTitle": "R", - "when": "r.helpViewer.show" - }, - { - "id": "rLiveShare", - "name": "Live Share Controls", - "icon": "./images/Rlogo.svg", - "contextualTitle": "R", - "when": "r.WorkspaceViewer:show && !r.liveShare:isGuest", - "visibility": "collapsed" - } - ] + { + "id": "rHelpPages", + "name": "Help Pages", + "icon": "./images/Rlogo.svg", + "contextualTitle": "R", + "when": "r.helpViewer.show" }, - "viewsWelcome": [ - { - "view": "workspaceViewer", - "when": "!r.WorkspaceViewer:show", - "contents": "R workspace viewer requires that the [session watcher be enabled](https://github.com/REditorSupport/vscode-R/wiki/R-Session-watcher)." - }, - { - "view": "rHelpPages", - "contents": "R Help Pages" - }, - { - "view": "rLiveShare", - "contents": "R Live Share not active.", - "when": "!r.liveShare:aborted" - }, - { - "view": "rLiveShare", - "contents": "Could not connect to Live Share service.", - "when": "r.liveShare:aborted" - } + { + "id": "rLiveShare", + "name": "Live Share Controls", + "icon": "./images/Rlogo.svg", + "contextualTitle": "R", + "when": "r.WorkspaceViewer:show && !r.liveShare:isGuest", + "visibility": "collapsed" + } + ] + }, + "viewsWelcome": [ + { + "view": "workspaceViewer", + "when": "!r.WorkspaceViewer:show", + "contents": "R workspace viewer requires that the [session watcher be enabled](https://github.com/REditorSupport/vscode-R/wiki/R-Session-watcher)." + }, + { + "view": "rHelpPages", + "contents": "R Help Pages" + }, + { + "view": "rLiveShare", + "contents": "R Live Share not active.", + "when": "!r.liveShare:aborted" + }, + { + "view": "rLiveShare", + "contents": "Could not connect to Live Share service.", + "when": "r.liveShare:aborted" + } + ], + "languages": [ + { + "id": "rd", + "extensions": [ + ".rd" ], - "languages": [ - { - "id": "rd", - "extensions": [ - ".rd" - ], - "aliases": [ - "R documentation", - "r documentation" - ], - "configuration": "./language-configuration/rd.json" - }, - { - "id": "debian-control.r", - "extensions": [ - ".Rproj" - ], - "aliases": [ - "R DCF" - ], - "filenames": [ - "DESCRIPTION", - ".lintr" - ], - "configuration": "./language-configuration/dcf.json" - }, - { - "id": "namespace.r", - "aliases": [ - "R NAMESPACE" - ], - "filenames": [ - "NAMESPACE" - ], - "configuration": "./language-configuration/rnamespace.json" - }, - { - "id": "buildignore.r", - "aliases": [ - "R ignore" - ], - "filenames": [ - ".Rbuildignore" - ], - "configuration": "./language-configuration/rbuildignore.json" - } + "aliases": [ + "R documentation", + "r documentation" ], - "snippets": [ - { - "language": "r", - "path": "./snippets/r-snippets.json" - }, - { - "language": "rd", - "path": "./snippets/r-snippets.json" - }, - { - "language": "rmd", - "path": "./snippets/rmarkdown.json" - } + "configuration": "./language-configuration/rd.json" + }, + { + "id": "debian-control.r", + "extensions": [ + ".Rproj" ], - "grammars": [ - { - "language": "rd", - "scopeName": "text.tex.latex.rd", - "path": "./syntaxes/rd.json" - }, - { - "language": "debian-control.r", - "scopeName": "debian-control.r", - "path": "./syntaxes/dcf.json", - "embeddedLanguages": { - "meta.embedded.block.r": "r" - } - }, - { - "path": "./syntaxes/Rcpp.json", - "scopeName": "comment.block.r", - "injectTo": [ - "source.cpp" - ] - }, - { - "language": "namespace.r", - "scopeName": "namespace.r", - "path": "./syntaxes/rnamespace.json" - }, - { - "language": "buildignore.r", - "scopeName": "buildignore.r", - "path": "./syntaxes/rbuildignore.json" - } + "aliases": [ + "R DCF" ], - "commands": [ - { - "command": "r.workspaceViewer.refreshEntry", - "title": "Manual Refresh", - "icon": "$(refresh)", - "category": "R Workspace Viewer", - "enablement": "rSessionActive" - }, - { - "command": "r.workspaceViewer.view", - "title": "View", - "icon": "$(open-preview)", - "category": "R Workspace Viewer" - }, - { - "command": "r.workspaceViewer.clear", - "title": "Clear environment", - "icon": "$(clear-all)", - "category": "R Workspace Viewer", - "enablement": "rSessionActive" - }, - { - "command": "r.workspaceViewer.remove", - "title": "Remove", - "icon": "$(close)", - "category": "R Workspace Viewer" - }, - { - "command": "r.workspaceViewer.save", - "title": "Save workspace", - "icon": "$(save)", - "category": "R Workspace Viewer", - "enablement": "rSessionActive" - }, - { - "command": "r.workspaceViewer.load", - "title": "Load workspace", - "icon": "$(folder-opened)", - "category": "R Workspace Viewer" - }, - { - "command": "r.workspaceViewer.package.showQuickPick", - "title": "Show QuickPick", - "category": "R Workspace Viewer" - }, - { - "command": "r.browser.refresh", - "title": "Refresh", - "icon": "$(refresh)", - "category": "R" - }, - { - "command": "r.browser.openExternal", - "title": "Open in external browser", - "icon": "$(link-external)", - "category": "R" - }, - { - "command": "r.showHelp", - "title": "Show help", - "category": "R" - }, - { - "command": "editor.action.webvieweditor.showFind", - "title": "R: Find in WebView", - "icon": "$(search)", - "category": "R" - }, - { - "title": "Create R terminal", - "category": "R", - "command": "r.createRTerm" - }, - { - "title": "Run Source", - "category": "R", - "command": "r.runSource", - "icon": "$(run)" - }, - { - "title": "Knit Rmd", - "category": "R", - "command": "r.knitRmd", - "icon": "$(run-below)" - }, - { - "title": "Knit Rmd To PDF", - "category": "R", - "command": "r.knitRmdToPdf" - }, - { - "title": "Knit Rmd To HTML", - "category": "R", - "command": "r.knitRmdToHtml" - }, - { - "title": "Knit Rmd To All Formats", - "category": "R", - "command": "r.knitRmdToAll" - }, - { - "title": "Run Source with Echo", - "category": "R", - "command": "r.runSourcewithEcho" - }, - { - "title": "Run Selection/Line", - "category": "R", - "command": "r.runSelection" - }, - { - "title": "Show number of rows for selected object", - "category": "R", - "command": "r.nrow" - }, - { - "title": "Show length for a selected object", - "category": "R", - "command": "r.length" - }, - { - "title": "Show first part of a selected object", - "category": "R", - "command": "r.head" - }, - { - "title": "Show first part of a selected object (transposed)", - "category": "R", - "command": "r.thead" - }, - { - "title": "Show names for a selected object", - "category": "R", - "command": "r.names" - }, - { - "title": "View selected object", - "category": "R", - "command": "r.view" - }, - { - "title": "Create gitignore", - "category": "R", - "command": "r.createGitignore" - }, - { - "title": "Create .lintr to the workspace", - "category": "R", - "command": "r.createLintrConfig" - }, - { - "title": "Preview Dataframe", - "category": "R", - "command": "r.previewDataframe" - }, - { - "title": "Preview Environment", - "category": "R", - "command": "r.previewEnvironment" - }, - { - "title": "Load All", - "category": "R Package", - "command": "r.loadAll" - }, - { - "title": "Build", - "category": "R Package", - "command": "r.build" - }, - { - "title": "Build Binary", - "category": "R Package", - "command": "r.buildBinary" - }, - { - "title": "Check", - "category": "R Package", - "command": "r.check" - }, - { - "title": "Document", - "category": "R Package", - "command": "r.document" - }, - { - "title": "Install", - "category": "R Package", - "command": "r.install" - }, - { - "title": "Test", - "category": "R Package", - "command": "r.test" - }, - { - "title": "Generate C/C++ Configuration", - "category": "R Package", - "command": "r.generateCCppProperties" - }, - { - "title": "Attach Active Terminal", - "category": "R", - "command": "r.attachActive" - }, - { - "title": "Run Command With Selection or Word in Terminal", - "category": "R", - "command": "r.runCommandWithSelectionOrWord" - }, - { - "title": "Run Command With Editor Path in Terminal", - "category": "R", - "command": "r.runCommandWithEditorPath" - }, - { - "title": "Run Command in Terminal", - "category": "R", - "command": "r.runCommand" - }, - { - "title": "Run from Beginning to Line", - "category": "R", - "command": "r.runFromBeginningToLine" - }, - { - "title": "Run from Line to End", - "category": "R", - "command": "r.runFromLineToEnd" - }, - { - "title": "Run Selection/Line (Retain Cursor)", - "category": "R", - "command": "r.runSelectionRetainCursor" - }, - { - "title": "Select Current Chunk", - "category": "R", - "command": "r.selectCurrentChunk" - }, - { - "title": "Run Current Chunk", - "category": "R", - "command": "r.runCurrentChunk" - }, - { - "title": "Run Current Chunk and Move to Next Chunk", - "category": "R", - "command": "r.runCurrentChunkAndMove" - }, - { - "title": "Run Previous Chunk", - "category": "R", - "command": "r.runPreviousChunk" - }, - { - "title": "Run Next Chunk", - "category": "R", - "command": "r.runNextChunk" - }, - { - "title": "Run Above Chunks", - "category": "R", - "command": "r.runAboveChunks" - }, - { - "title": "Run Current and Below Chunks", - "category": "R", - "command": "r.runCurrentAndBelowChunks" - }, - { - "title": "Run Below Chunks", - "category": "R", - "command": "r.runBelowChunks" - }, - { - "title": "Run All Chunks", - "category": "R", - "command": "r.runAllChunks" - }, - { - "title": "Go to Previous Chunk", - "category": "R", - "command": "r.goToPreviousChunk" - }, - { - "title": "Go to Next Chunk", - "category": "R", - "command": "r.goToNextChunk" - }, - { - "title": "New Draft", - "category": "R Markdown", - "command": "r.rmarkdown.newDraft" - }, - { - "title": "R Markdown (rmd)", - "category": "R Markdown", - "when": false, - "command": "r.rmarkdown.newFileDraft" - }, - { - "title": "R Document (r)", - "category": "R", - "when": false, - "command": "r.newFileDocument" - }, - { - "command": "r.rmarkdown.setKnitDirectory", - "title": "Set Knit directory", - "icon": "$(zap)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.showPreviewToSide", - "title": "Open Preview to the Side", - "icon": "$(open-preview)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.showPreview", - "title": "Open Preview", - "icon": "$(open-preview)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.preview.refresh", - "title": "Refresh Preview", - "icon": "$(refresh)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.preview.openExternal", - "title": "Open in External Browser", - "icon": "$(link-external)", - "category": "R Markdown" - }, - { - "command": "r.rmarkdown.preview.showSource", - "title": "Show Source", - "icon": "$(go-to-file)", - "category": "R Markdown" - }, - { - "title": "Toggle Style", - "category": "R Markdown", - "command": "r.rmarkdown.preview.toggleStyle", - "icon": "$(symbol-color)" - }, - { - "title": "Enable Auto Refresh", - "category": "R Markdown", - "command": "r.rmarkdown.preview.enableAutoRefresh", - "icon": "$(sync)" - }, - { - "title": "Disable Auto Refresh", - "category": "R Markdown", - "command": "r.rmarkdown.preview.disableAutoRefresh", - "icon": "$(sync-ignored)" - }, - { - "title": "Launch RStudio Addin", - "category": "R", - "command": "r.launchAddinPicker" - }, - { - "command": "r.helpPanel.back", - "title": "Go Back", - "category": "R Help Panel", - "enablement": "r.helpPanel.canGoBack", - "icon": "$(arrow-left)" - }, - { - "command": "r.helpPanel.forward", - "title": "Go Forward", - "category": "R Help Panel", - "enablement": "r.helpPanel.canGoForward", - "icon": "$(arrow-right)" - }, - { - "command": "r.helpPanel.openExternal", - "title": "Open in external browser", - "category": "R Help Panel", - "enablement": "r.helpPanel.canOpenExternal", - "icon": "$(link-external)" - }, - { - "title": "Search Package Topics", - "category": "R Help Panel", - "command": "r.helpPanel.searchPackage", - "icon": "$(search)" - }, - { - "title": "Open Topic in new Panel", - "category": "R Help Panel", - "command": "r.helpPanel.openInNewPanel", - "icon": "$(add)" - }, - { - "title": "Clear Cached Files", - "category": "R Help Panel", - "command": "r.helpPanel.clearCache", - "icon": "$(refresh)" - }, - { - "title": "Filter Packages", - "category": "R Help Panel", - "command": "r.helpPanel.filterPackages", - "icon": "$(filter)" - }, - { - "title": "Remove from favorites", - "category": "R Help Panel", - "command": "r.helpPanel.removeFromFavorites", - "icon": "$(star-full)" - }, - { - "title": "Add to favorites", - "category": "R Help Panel", - "command": "r.helpPanel.addToFavorites", - "icon": "$(star-empty)" - }, - { - "title": "Show all packages", - "category": "R Help Panel", - "command": "r.helpPanel.showAllPackages", - "icon": "$(star-full)" - }, - { - "title": "Show only favorites", - "category": "R Help Panel", - "command": "r.helpPanel.showOnlyFavorites", - "icon": "$(star-empty)" - }, - { - "title": "Remove Package", - "category": "R Help Panel", - "command": "r.helpPanel.removePackage", - "icon": "$(trash)" - }, - { - "title": "Update Installed Packages", - "category": "R Help Panel", - "command": "r.helpPanel.updateInstalledPackages", - "icon": "$(clone)" - }, - { - "title": "Update/reinstall Package", - "category": "R Help Panel", - "command": "r.helpPanel.updatePackage", - "icon": "$(cloud-download)" - }, - { - "title": "Install multiple packages", - "category": "R Help Panel", - "command": "r.helpPanel.installPackages", - "icon": "$(expand-all)" - }, - { - "title": "Show QuickPick", - "category": "R Help Panel", - "command": "r.helpPanel.showQuickPick", - "icon": "$(zap)" - }, - { - "title": "Summarize Identical Topics", - "category": "R Help Panel", - "command": "r.helpPanel.summarizeTopics", - "icon": "$(fold)" - }, - { - "title": "Don't Summarize Identical Topics", - "category": "R Help Panel", - "command": "r.helpPanel.unsummarizeTopics", - "icon": "$(unfold)" - }, - { - "title": "Open help for selection", - "category": "R Help Panel", - "command": "r.helpPanel.openForSelection" - }, - { - "title": "Open help for path", - "category": "R Help Panel", - "command": "r.helpPanel.openForPath" - }, - { - "command": "r.liveShare.toggle", - "category": "R Live Share", - "title": "Toggle" - }, - { - "command": "r.liveShare.retry", - "title": "Retry connection to Live Share service", - "category": "R Live Share", - "icon": "$(refresh)" - }, - { - "title": "Toggle Style", - "category": "R Plot", - "command": "r.plot.toggleStyle", - "icon": "$(symbol-color)" - }, - { - "title": "Toggle Full Window Mode", - "category": "R Plot", - "command": "r.plot.toggleFullWindow", - "icon": "$(screen-full)" - }, - { - "title": "Toggle Preview Plot Layout", - "category": "R Plot", - "command": "r.plot.togglePreviewPlots", - "icon": "$(list-flat)" - }, - { - "title": "Export Plot", - "category": "R Plot", - "command": "r.plot.exportPlot", - "icon": "$(clone)" - }, - { - "title": "Close Plot", - "category": "R Plot", - "command": "r.plot.closePlot", - "icon": "$(trash)" - }, - { - "title": "Hide Plot", - "category": "R Plot", - "command": "r.plot.hidePlot", - "icon": "$(close)" - }, - { - "title": "Restore Plots", - "category": "R Plot", - "command": "r.plot.resetPlots", - "icon": "$(discard)" - }, - { - "title": "Previous Plot", - "category": "R Plot", - "command": "r.plot.prevPlot", - "enablement": "r.plot.canGoBack", - "icon": "$(chevron-left)" - }, - { - "title": "Next Plot", - "category": "R Plot", - "command": "r.plot.nextPlot", - "enablement": "r.plot.canGoForward", - "icon": "$(chevron-right)" - }, - { - "title": "First Plot", - "category": "R Plot", - "command": "r.plot.firstPlot", - "enablement": "r.plot.canGoBack", - "icon": "$(arrow-left)" - }, - { - "title": "Last Plot", - "category": "R Plot", - "command": "r.plot.lastPlot", - "enablement": "r.plot.canGoForward", - "icon": "$(arrow-right)" - }, - { - "title": "Zoom In", - "category": "R Plot", - "command": "r.plot.zoomIn", - "icon": "$(zoom-in)" - }, - { - "title": "Zoom Out", - "category": "R Plot", - "command": "r.plot.zoomOut", - "icon": "$(zoom-out)" - }, - { - "title": "Show Viewers", - "category": "R Plot", - "command": "r.plot.showViewers", - "icon": "$(versions)" - }, - { - "title": "Open Httpgd Url", - "category": "R Plot", - "command": "r.plot.openUrl", - "icon": "$(link)" - }, - { - "title": "Open in External Browser", - "category": "R Plot", - "command": "r.plot.openExternal", - "icon": "$(link-external)" - } + "filenames": [ + "DESCRIPTION", + ".lintr" ], - "keybindings": [ - { - "command": "r.runSelection", - "key": "Ctrl+enter", - "mac": "cmd+enter", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runSelection", - "key": "Ctrl+enter", - "mac": "cmd+enter", - "when": "editorTextFocus && editorLangId == 'rmd'" - }, - { - "command": "r.runSelectionRetainCursor", - "key": "alt+enter", - "mac": "option+enter", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runCurrentChunk", - "key": "Ctrl+shift+enter", - "mac": "cmd+shift+enter", - "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" - }, - { - "command": "r.runAboveChunks", - "key": "Ctrl+alt+p", - "mac": "cmd+alt+p", - "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" - }, - { - "command": "r.runSource", - "key": "shift+Ctrl+s", - "mac": "shift+cmd+s", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.knitRmd", - "key": "shift+Ctrl+k", - "mac": "shift+cmd+k", - "when": "editorTextFocus && editorLangId == 'rmd'" - }, - { - "command": "r.runSourcewithEcho", - "key": "shift+Ctrl+enter", - "mac": "shift+cmd+enter", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runFromBeginningToLine", - "key": "Ctrl+alt+b", - "mac": "cmd+alt+b", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.runFromLineToEnd", - "key": "Ctrl+alt+e", - "mac": "cmd+alt+e", - "when": "editorTextFocus && editorLangId == 'r'" - }, - { - "command": "r.rmarkdown.showPreviewToSide", - "key": "Ctrl+k v", - "mac": "cmd+k v", - "when": "editorTextFocus && editorLangId == 'rmd'" - }, - { - "command": "r.rmarkdown.showPreview", - "key": "Ctrl+shift+v", - "mac": "cmd+shift+v", - "when": "editorTextFocus && editorLangId == 'rmd'" - } + "configuration": "./language-configuration/dcf.json" + }, + { + "id": "namespace.r", + "aliases": [ + "R NAMESPACE" ], - "menus": { - "commandPalette": [ - { - "command": "r.workspaceViewer.view", - "when": "false" - }, - { - "command": "r.workspaceViewer.remove", - "when": "false" - }, - { - "command": "r.workspaceViewer.package.showQuickPick", - "when": "false" - }, - { - "command": "r.helpPanel.back", - "when": "false" - }, - { - "command": "r.helpPanel.forward", - "when": "false" - }, - { - "command": "r.helpPanel.openExternal", - "when": "false" - }, - { - "command": "r.helpPanel.searchPackage", - "when": "false" - }, - { - "command": "r.helpPanel.openInNewPanel", - "when": "false" - }, - { - "command": "r.helpPanel.clearCache", - "when": "false" - }, - { - "command": "r.helpPanel.filterPackages", - "when": "false" - }, - { - "command": "r.helpPanel.removeFromFavorites", - "when": "false" - }, - { - "command": "r.helpPanel.addToFavorites", - "when": "false" - }, - { - "command": "r.helpPanel.showAllPackages", - "when": "false" - }, - { - "command": "r.helpPanel.showOnlyFavorites", - "when": "false" - }, - { - "command": "r.helpPanel.removePackage", - "when": "false" - }, - { - "command": "r.helpPanel.updateInstalledPackages", - "when": "false" - }, - { - "command": "r.helpPanel.updatePackage", - "when": "false" - }, - { - "command": "r.helpPanel.installPackages", - "when": "false" - }, - { - "command": "r.helpPanel.showQuickPick", - "when": "false" - }, - { - "command": "r.helpPanel.summarizeTopics", - "when": "false" - }, - { - "command": "r.helpPanel.unsummarizeTopics", - "when": "false" - }, - { - "command": "r.helpPanel.openForPath", - "when": "false" - }, - { - "command": "r.liveShare.toggle", - "when": "false" - } - ], - "editor/title/run": [ - { - "when": "editorLangId == r", - "command": "r.runSource" - }, - { - "when": "editorLangId == rmd && editorFocus", - "command": "r.knitRmd", - "group": "navigation" - } - ], - "editor/title": [ - { - "command": "r.rmarkdown.preview.openExternal", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@1" - }, - { - "command": "r.rmarkdown.preview.showSource", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@2" - }, - { - "command": "r.rmarkdown.preview.toggleStyle", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@3" - }, - { - "command": "r.rmarkdown.preview.refresh", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", - "group": "navigation@4" - }, - { - "command": "r.rmarkdown.preview.enableAutoRefresh", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && !r.rmarkdown.preview.autoRefresh", - "group": "navigation@5" - }, - { - "command": "r.rmarkdown.preview.disableAutoRefresh", - "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && r.rmarkdown.preview.autoRefresh", - "group": "navigation@5" - }, - { - "command": "r.browser.refresh", - "when": "resourceScheme =~ /webview/ && r.browser.active", - "group": "navigation" - }, - { - "command": "r.browser.openExternal", - "when": "resourceScheme =~ /webview/ && r.browser.active", - "group": "navigation" - }, - { - "command": "editor.action.webvieweditor.showFind", - "when": "resourceScheme =~ /webview/ && r.browser.active", - "group": "navigation" - }, - { - "command": "editor.action.webvieweditor.showFind", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "command": "r.helpPanel.back", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "command": "r.helpPanel.forward", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "command": "r.helpPanel.openExternal", - "when": "resourceScheme =~ /webview/ && r.helpPanel.active", - "group": "navigation" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.toggleStyle" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.toggleFullWindow" - }, - { - "group": "httpgd", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.togglePreviewPlots" - }, - { - "group": "httpgd", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.exportPlot" - }, - { - "group": "navigation@01", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.prevPlot", - "alt": "r.plot.firstPlot" - }, - { - "group": "navigation@02", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.nextPlot", - "alt": "r.plot.lastPlot" - }, - { - "group": "navigation@03", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.hidePlot", - "alt": "r.plot.closePlot" - }, - { - "group": "navigation@04", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.resetPlots" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.zoomIn", - "alt": "r.plot.zoomOut" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.zoomOut", - "alt": "r.plot.zoomIn" - }, - { - "group": "navigation", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.openExternal" - }, - { - "group": "httpgd", - "when": "resourceScheme =~ /webview/ && r.plot.active", - "command": "r.plot.openUrl" - }, - { - "command": "r.rmarkdown.showPreviewToSide", - "alt": "r.rmarkdown.showPreview", - "when": "editorLangId == rmd && editorFocus", - "group": "navigation" - }, - { - "submenu": "r.knitCommands", - "when": "editorLangId == rmd && editorFocus", - "group": "@1" - }, - { - "command": "r.rmarkdown.setKnitDirectory", - "when": "editorLangId == rmd && editorFocus", - "group": "@1" - } - ], - "editor/context": [ - { - "command": "r.helpPanel.openForSelection", - "when": "resourceLangId == r" - }, - { - "command": "r.helpPanel.openForSelection", - "when": "resourceLangId == rmd" - } - ], - "view/item/context": [ - { - "command": "r.workspaceViewer.view", - "group": "inline", - "when": "view == workspaceViewer && viewItem == rootNode" - }, - { - "command": "r.workspaceViewer.remove", - "group": "inline", - "when": "view == workspaceViewer && viewItem == rootNode" - }, - { - "command": "r.helpPanel.searchPackage", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_searchPackage_/" - }, - { - "command": "r.helpPanel.openInNewPanel", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_openInNewPanel_/" - }, - { - "command": "r.helpPanel.clearCache", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_clearCache_/" - }, - { - "command": "r.helpPanel.addToFavorites", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_addToFavorites_/" - }, - { - "command": "r.helpPanel.removeFromFavorites", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_removeFromFavorites_/" - }, - { - "command": "r.helpPanel.showOnlyFavorites", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_showOnlyFavorites_/" - }, - { - "command": "r.helpPanel.showAllPackages", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_showAllPackages_/" - }, - { - "command": "r.helpPanel.removePackage", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_removePackage_/" - }, - { - "command": "r.helpPanel.updateInstalledPackages", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_updateInstalledPackages_/" - }, - { - "command": "r.helpPanel.updatePackage", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_updatePackage_/" - }, - { - "command": "r.helpPanel.installPackages", - "group": "inline@9", - "when": "view == rHelpPages && viewItem =~ /_installPackages_/" - }, - { - "command": "r.helpPanel.filterPackages", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_filterPackages_/" - }, - { - "command": "r.helpPanel.showQuickPick", - "group": "inline", - "when": "view == rHelpPages && viewItem =~ /_QUICKPICK_/" - }, - { - "command": "r.helpPanel.unsummarizeTopics", - "group": "inline@8", - "when": "view == rHelpPages && viewItem =~ /_unsummarizeTopics_/" - }, - { - "command": "r.helpPanel.summarizeTopics", - "group": "inline@8", - "when": "view == rHelpPages && viewItem =~ /_summarizeTopics_/" - }, - { - "command": "r.liveShare.toggle", - "when": "view == rLiveShare" - } - ], - "view/title": [ - { - "command": "r.workspaceViewer.load", - "group": "navigation@0", - "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" - }, - { - "command": "r.workspaceViewer.save", - "group": "navigation@1", - "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" - }, - { - "command": "r.workspaceViewer.clear", - "group": "navigation@2", - "when": "r.WorkspaceViewer:show && view == workspaceViewer" - }, - { - "command": "r.workspaceViewer.refreshEntry", - "group": "navigation@3", - "when": "r.WorkspaceViewer:show && view == workspaceViewer" - }, - { - "command": "r.helpPanel.showQuickPick", - "group": "navigation", - "when": "view == rHelpPages" - }, - { - "command": "r.liveShare.retry", - "group": "navigation@3", - "when": "view == rLiveShare && r.liveShare:aborted" - } - ], - "explorer/context": [ - { - "command": "r.rmarkdown.showPreview", - "when": "resourceLangId == rmd", - "group": "navigation" - } - ], - "r.knitCommands": [ - { - "command": "r.knitRmd" - }, - { - "command": "r.knitRmdToPdf" - }, - { - "command": "r.knitRmdToHtml" - }, - { - "command": "r.knitRmdToAll" - } - ], - "file/newFile": [ - { - "group": "R", - "command": "r.rmarkdown.newFileDraft" - }, - { - "group": "R", - "command": "r.newFileDocument" - } + "filenames": [ + "NAMESPACE" + ], + "configuration": "./language-configuration/rnamespace.json" + }, + { + "id": "buildignore.r", + "aliases": [ + "R ignore" + ], + "filenames": [ + ".Rbuildignore" + ], + "configuration": "./language-configuration/rbuildignore.json" + } + ], + "snippets": [ + { + "language": "r", + "path": "./snippets/r-snippets.json" + }, + { + "language": "rd", + "path": "./snippets/r-snippets.json" + }, + { + "language": "rmd", + "path": "./snippets/rmarkdown.json" + } + ], + "grammars": [ + { + "language": "rd", + "scopeName": "text.tex.latex.rd", + "path": "./syntaxes/rd.json" + }, + { + "language": "debian-control.r", + "scopeName": "debian-control.r", + "path": "./syntaxes/dcf.json", + "embeddedLanguages": { + "meta.embedded.block.r": "r" + } + }, + { + "path": "./syntaxes/Rcpp.json", + "scopeName": "comment.block.r", + "injectTo": [ + "source.cpp" + ] + }, + { + "language": "namespace.r", + "scopeName": "namespace.r", + "path": "./syntaxes/rnamespace.json" + }, + { + "language": "buildignore.r", + "scopeName": "buildignore.r", + "path": "./syntaxes/rbuildignore.json" + } + ], + "commands": [ + { + "command": "r.workspaceViewer.refreshEntry", + "title": "Manual Refresh", + "icon": "$(refresh)", + "category": "R Workspace Viewer", + "enablement": "rSessionActive" + }, + { + "command": "r.workspaceViewer.view", + "title": "View", + "icon": "$(open-preview)", + "category": "R Workspace Viewer" + }, + { + "command": "r.workspaceViewer.clear", + "title": "Clear environment", + "icon": "$(clear-all)", + "category": "R Workspace Viewer", + "enablement": "rSessionActive" + }, + { + "command": "r.workspaceViewer.remove", + "title": "Remove", + "icon": "$(close)", + "category": "R Workspace Viewer" + }, + { + "command": "r.workspaceViewer.save", + "title": "Save workspace", + "icon": "$(save)", + "category": "R Workspace Viewer", + "enablement": "rSessionActive" + }, + { + "command": "r.workspaceViewer.load", + "title": "Load workspace", + "icon": "$(folder-opened)", + "category": "R Workspace Viewer" + }, + { + "command": "r.workspaceViewer.package.showQuickPick", + "title": "Show QuickPick", + "category": "R Workspace Viewer" + }, + { + "command": "r.browser.refresh", + "title": "Refresh", + "icon": "$(refresh)", + "category": "R" + }, + { + "command": "r.browser.openExternal", + "title": "Open in external browser", + "icon": "$(link-external)", + "category": "R" + }, + { + "command": "r.showHelp", + "title": "Show help", + "category": "R" + }, + { + "command": "editor.action.webvieweditor.showFind", + "title": "R: Find in WebView", + "icon": "$(search)", + "category": "R" + }, + { + "title": "Create R terminal", + "category": "R", + "command": "r.createRTerm" + }, + { + "title": "Run Source", + "category": "R", + "command": "r.runSource", + "icon": "$(run)" + }, + { + "title": "Knit Rmd", + "category": "R", + "command": "r.knitRmd", + "icon": "$(run-below)" + }, + { + "title": "Knit Rmd To PDF", + "category": "R", + "command": "r.knitRmdToPdf" + }, + { + "title": "Knit Rmd To HTML", + "category": "R", + "command": "r.knitRmdToHtml" + }, + { + "title": "Knit Rmd To All Formats", + "category": "R", + "command": "r.knitRmdToAll" + }, + { + "title": "Run Source with Echo", + "category": "R", + "command": "r.runSourcewithEcho" + }, + { + "title": "Run Selection/Line", + "category": "R", + "command": "r.runSelection" + }, + { + "title": "Show number of rows for selected object", + "category": "R", + "command": "r.nrow" + }, + { + "title": "Show length for a selected object", + "category": "R", + "command": "r.length" + }, + { + "title": "Show first part of a selected object", + "category": "R", + "command": "r.head" + }, + { + "title": "Show first part of a selected object (transposed)", + "category": "R", + "command": "r.thead" + }, + { + "title": "Show names for a selected object", + "category": "R", + "command": "r.names" + }, + { + "title": "View selected object", + "category": "R", + "command": "r.view" + }, + { + "title": "Create gitignore", + "category": "R", + "command": "r.createGitignore" + }, + { + "title": "Create .lintr to the workspace", + "category": "R", + "command": "r.createLintrConfig" + }, + { + "title": "Preview Dataframe", + "category": "R", + "command": "r.previewDataframe" + }, + { + "title": "Preview Environment", + "category": "R", + "command": "r.previewEnvironment" + }, + { + "title": "Load All", + "category": "R Package", + "command": "r.loadAll" + }, + { + "title": "Build", + "category": "R Package", + "command": "r.build" + }, + { + "title": "Build Binary", + "category": "R Package", + "command": "r.buildBinary" + }, + { + "title": "Check", + "category": "R Package", + "command": "r.check" + }, + { + "title": "Document", + "category": "R Package", + "command": "r.document" + }, + { + "title": "Install", + "category": "R Package", + "command": "r.install" + }, + { + "title": "Test", + "category": "R Package", + "command": "r.test" + }, + { + "title": "Generate C/C++ Configuration", + "category": "R Package", + "command": "r.generateCCppProperties" + }, + { + "title": "Attach Active Terminal", + "category": "R", + "command": "r.attachActive" + }, + { + "title": "Run Command With Selection or Word in Terminal", + "category": "R", + "command": "r.runCommandWithSelectionOrWord" + }, + { + "title": "Run Command With Editor Path in Terminal", + "category": "R", + "command": "r.runCommandWithEditorPath" + }, + { + "title": "Run Command in Terminal", + "category": "R", + "command": "r.runCommand" + }, + { + "title": "Run from Beginning to Line", + "category": "R", + "command": "r.runFromBeginningToLine" + }, + { + "title": "Run from Line to End", + "category": "R", + "command": "r.runFromLineToEnd" + }, + { + "title": "Run Selection/Line (Retain Cursor)", + "category": "R", + "command": "r.runSelectionRetainCursor" + }, + { + "title": "Select Current Chunk", + "category": "R", + "command": "r.selectCurrentChunk" + }, + { + "title": "Run Current Chunk", + "category": "R", + "command": "r.runCurrentChunk" + }, + { + "title": "Run Current Chunk and Move to Next Chunk", + "category": "R", + "command": "r.runCurrentChunkAndMove" + }, + { + "title": "Run Previous Chunk", + "category": "R", + "command": "r.runPreviousChunk" + }, + { + "title": "Run Next Chunk", + "category": "R", + "command": "r.runNextChunk" + }, + { + "title": "Run Above Chunks", + "category": "R", + "command": "r.runAboveChunks" + }, + { + "title": "Run Current and Below Chunks", + "category": "R", + "command": "r.runCurrentAndBelowChunks" + }, + { + "title": "Run Below Chunks", + "category": "R", + "command": "r.runBelowChunks" + }, + { + "title": "Run All Chunks", + "category": "R", + "command": "r.runAllChunks" + }, + { + "title": "Go to Previous Chunk", + "category": "R", + "command": "r.goToPreviousChunk" + }, + { + "title": "Go to Next Chunk", + "category": "R", + "command": "r.goToNextChunk" + }, + { + "title": "New Draft", + "category": "R Markdown", + "command": "r.rmarkdown.newDraft" + }, + { + "title": "R Markdown (rmd)", + "category": "R Markdown", + "when": false, + "command": "r.rmarkdown.newFileDraft" + }, + { + "title": "R Document (r)", + "category": "R", + "when": false, + "command": "r.newFileDocument" + }, + { + "command": "r.rmarkdown.setKnitDirectory", + "title": "Set Knit directory", + "icon": "$(zap)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.showPreviewToSide", + "title": "Open Preview to the Side", + "icon": "$(open-preview)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.showPreview", + "title": "Open Preview", + "icon": "$(open-preview)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.preview.refresh", + "title": "Refresh Preview", + "icon": "$(refresh)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.preview.openExternal", + "title": "Open in External Browser", + "icon": "$(link-external)", + "category": "R Markdown" + }, + { + "command": "r.rmarkdown.preview.showSource", + "title": "Show Source", + "icon": "$(go-to-file)", + "category": "R Markdown" + }, + { + "title": "Toggle Style", + "category": "R Markdown", + "command": "r.rmarkdown.preview.toggleStyle", + "icon": "$(symbol-color)" + }, + { + "title": "Enable Auto Refresh", + "category": "R Markdown", + "command": "r.rmarkdown.preview.enableAutoRefresh", + "icon": "$(sync)" + }, + { + "title": "Disable Auto Refresh", + "category": "R Markdown", + "command": "r.rmarkdown.preview.disableAutoRefresh", + "icon": "$(sync-ignored)" + }, + { + "title": "Launch RStudio Addin", + "category": "R", + "command": "r.launchAddinPicker" + }, + { + "command": "r.helpPanel.back", + "title": "Go Back", + "category": "R Help Panel", + "enablement": "r.helpPanel.canGoBack", + "icon": "$(arrow-left)" + }, + { + "command": "r.helpPanel.forward", + "title": "Go Forward", + "category": "R Help Panel", + "enablement": "r.helpPanel.canGoForward", + "icon": "$(arrow-right)" + }, + { + "command": "r.helpPanel.openExternal", + "title": "Open in external browser", + "category": "R Help Panel", + "enablement": "r.helpPanel.canOpenExternal", + "icon": "$(link-external)" + }, + { + "title": "Search Package Topics", + "category": "R Help Panel", + "command": "r.helpPanel.searchPackage", + "icon": "$(search)" + }, + { + "title": "Open Topic in new Panel", + "category": "R Help Panel", + "command": "r.helpPanel.openInNewPanel", + "icon": "$(add)" + }, + { + "title": "Clear Cached Files", + "category": "R Help Panel", + "command": "r.helpPanel.clearCache", + "icon": "$(refresh)" + }, + { + "title": "Filter Packages", + "category": "R Help Panel", + "command": "r.helpPanel.filterPackages", + "icon": "$(filter)" + }, + { + "title": "Remove from favorites", + "category": "R Help Panel", + "command": "r.helpPanel.removeFromFavorites", + "icon": "$(star-full)" + }, + { + "title": "Add to favorites", + "category": "R Help Panel", + "command": "r.helpPanel.addToFavorites", + "icon": "$(star-empty)" + }, + { + "title": "Show all packages", + "category": "R Help Panel", + "command": "r.helpPanel.showAllPackages", + "icon": "$(star-full)" + }, + { + "title": "Show only favorites", + "category": "R Help Panel", + "command": "r.helpPanel.showOnlyFavorites", + "icon": "$(star-empty)" + }, + { + "title": "Remove Package", + "category": "R Help Panel", + "command": "r.helpPanel.removePackage", + "icon": "$(trash)" + }, + { + "title": "Update Installed Packages", + "category": "R Help Panel", + "command": "r.helpPanel.updateInstalledPackages", + "icon": "$(clone)" + }, + { + "title": "Update/reinstall Package", + "category": "R Help Panel", + "command": "r.helpPanel.updatePackage", + "icon": "$(cloud-download)" + }, + { + "title": "Install multiple packages", + "category": "R Help Panel", + "command": "r.helpPanel.installPackages", + "icon": "$(expand-all)" + }, + { + "title": "Show QuickPick", + "category": "R Help Panel", + "command": "r.helpPanel.showQuickPick", + "icon": "$(zap)" + }, + { + "title": "Summarize Identical Topics", + "category": "R Help Panel", + "command": "r.helpPanel.summarizeTopics", + "icon": "$(fold)" + }, + { + "title": "Don't Summarize Identical Topics", + "category": "R Help Panel", + "command": "r.helpPanel.unsummarizeTopics", + "icon": "$(unfold)" + }, + { + "title": "Open help for selection", + "category": "R Help Panel", + "command": "r.helpPanel.openForSelection" + }, + { + "title": "Open help for path", + "category": "R Help Panel", + "command": "r.helpPanel.openForPath" + }, + { + "command": "r.liveShare.toggle", + "category": "R Live Share", + "title": "Toggle" + }, + { + "command": "r.liveShare.retry", + "title": "Retry connection to Live Share service", + "category": "R Live Share", + "icon": "$(refresh)" + }, + { + "title": "Toggle Style", + "category": "R Plot", + "command": "r.plot.toggleStyle", + "icon": "$(symbol-color)" + }, + { + "title": "Toggle Full Window Mode", + "category": "R Plot", + "command": "r.plot.toggleFullWindow", + "icon": "$(screen-full)" + }, + { + "title": "Toggle Preview Plot Layout", + "category": "R Plot", + "command": "r.plot.togglePreviewPlots", + "icon": "$(list-flat)" + }, + { + "title": "Export Plot", + "category": "R Plot", + "command": "r.plot.exportPlot", + "icon": "$(clone)" + }, + { + "title": "Close Plot", + "category": "R Plot", + "command": "r.plot.closePlot", + "icon": "$(trash)" + }, + { + "title": "Hide Plot", + "category": "R Plot", + "command": "r.plot.hidePlot", + "icon": "$(close)" + }, + { + "title": "Restore Plots", + "category": "R Plot", + "command": "r.plot.resetPlots", + "icon": "$(discard)" + }, + { + "title": "Previous Plot", + "category": "R Plot", + "command": "r.plot.prevPlot", + "enablement": "r.plot.canGoBack", + "icon": "$(chevron-left)" + }, + { + "title": "Next Plot", + "category": "R Plot", + "command": "r.plot.nextPlot", + "enablement": "r.plot.canGoForward", + "icon": "$(chevron-right)" + }, + { + "title": "First Plot", + "category": "R Plot", + "command": "r.plot.firstPlot", + "enablement": "r.plot.canGoBack", + "icon": "$(arrow-left)" + }, + { + "title": "Last Plot", + "category": "R Plot", + "command": "r.plot.lastPlot", + "enablement": "r.plot.canGoForward", + "icon": "$(arrow-right)" + }, + { + "title": "Zoom In", + "category": "R Plot", + "command": "r.plot.zoomIn", + "icon": "$(zoom-in)" + }, + { + "title": "Zoom Out", + "category": "R Plot", + "command": "r.plot.zoomOut", + "icon": "$(zoom-out)" + }, + { + "title": "Show Viewers", + "category": "R Plot", + "command": "r.plot.showViewers", + "icon": "$(versions)" + }, + { + "title": "Open Httpgd Url", + "category": "R Plot", + "command": "r.plot.openUrl", + "icon": "$(link)" + }, + { + "title": "Open in External Browser", + "category": "R Plot", + "command": "r.plot.openExternal", + "icon": "$(link-external)" + } + ], + "keybindings": [ + { + "command": "r.runSelection", + "key": "Ctrl+enter", + "mac": "cmd+enter", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runSelection", + "key": "Ctrl+enter", + "mac": "cmd+enter", + "when": "editorTextFocus && editorLangId == 'rmd'" + }, + { + "command": "r.runSelectionRetainCursor", + "key": "alt+enter", + "mac": "option+enter", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runCurrentChunk", + "key": "Ctrl+shift+enter", + "mac": "cmd+shift+enter", + "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" + }, + { + "command": "r.runAboveChunks", + "key": "Ctrl+alt+p", + "mac": "cmd+alt+p", + "when": "editorTextFocus && (editorLangId == 'rmd' || editorLangId == 'r')" + }, + { + "command": "r.runSource", + "key": "shift+Ctrl+s", + "mac": "shift+cmd+s", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.knitRmd", + "key": "shift+Ctrl+k", + "mac": "shift+cmd+k", + "when": "editorTextFocus && editorLangId == 'rmd'" + }, + { + "command": "r.runSourcewithEcho", + "key": "shift+Ctrl+enter", + "mac": "shift+cmd+enter", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runFromBeginningToLine", + "key": "Ctrl+alt+b", + "mac": "cmd+alt+b", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.runFromLineToEnd", + "key": "Ctrl+alt+e", + "mac": "cmd+alt+e", + "when": "editorTextFocus && editorLangId == 'r'" + }, + { + "command": "r.rmarkdown.showPreviewToSide", + "key": "Ctrl+k v", + "mac": "cmd+k v", + "when": "editorTextFocus && editorLangId == 'rmd'" + }, + { + "command": "r.rmarkdown.showPreview", + "key": "Ctrl+shift+v", + "mac": "cmd+shift+v", + "when": "editorTextFocus && editorLangId == 'rmd'" + } + ], + "menus": { + "commandPalette": [ + { + "command": "r.workspaceViewer.view", + "when": "false" + }, + { + "command": "r.workspaceViewer.remove", + "when": "false" + }, + { + "command": "r.workspaceViewer.package.showQuickPick", + "when": "false" + }, + { + "command": "r.helpPanel.back", + "when": "false" + }, + { + "command": "r.helpPanel.forward", + "when": "false" + }, + { + "command": "r.helpPanel.openExternal", + "when": "false" + }, + { + "command": "r.helpPanel.searchPackage", + "when": "false" + }, + { + "command": "r.helpPanel.openInNewPanel", + "when": "false" + }, + { + "command": "r.helpPanel.clearCache", + "when": "false" + }, + { + "command": "r.helpPanel.filterPackages", + "when": "false" + }, + { + "command": "r.helpPanel.removeFromFavorites", + "when": "false" + }, + { + "command": "r.helpPanel.addToFavorites", + "when": "false" + }, + { + "command": "r.helpPanel.showAllPackages", + "when": "false" + }, + { + "command": "r.helpPanel.showOnlyFavorites", + "when": "false" + }, + { + "command": "r.helpPanel.removePackage", + "when": "false" + }, + { + "command": "r.helpPanel.updateInstalledPackages", + "when": "false" + }, + { + "command": "r.helpPanel.updatePackage", + "when": "false" + }, + { + "command": "r.helpPanel.installPackages", + "when": "false" + }, + { + "command": "r.helpPanel.showQuickPick", + "when": "false" + }, + { + "command": "r.helpPanel.summarizeTopics", + "when": "false" + }, + { + "command": "r.helpPanel.unsummarizeTopics", + "when": "false" + }, + { + "command": "r.helpPanel.openForPath", + "when": "false" + }, + { + "command": "r.liveShare.toggle", + "when": "false" + } + ], + "editor/title/run": [ + { + "when": "editorLangId == r", + "command": "r.runSource" + }, + { + "when": "editorLangId == rmd && editorFocus", + "command": "r.knitRmd", + "group": "navigation" + } + ], + "editor/title": [ + { + "command": "r.rmarkdown.preview.openExternal", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@1" + }, + { + "command": "r.rmarkdown.preview.showSource", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@2" + }, + { + "command": "r.rmarkdown.preview.toggleStyle", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@3" + }, + { + "command": "r.rmarkdown.preview.refresh", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active", + "group": "navigation@4" + }, + { + "command": "r.rmarkdown.preview.enableAutoRefresh", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && !r.rmarkdown.preview.autoRefresh", + "group": "navigation@5" + }, + { + "command": "r.rmarkdown.preview.disableAutoRefresh", + "when": "resourceScheme =~ /webview/ && r.rmarkdown.preview.active && r.rmarkdown.preview.autoRefresh", + "group": "navigation@5" + }, + { + "command": "r.browser.refresh", + "when": "resourceScheme =~ /webview/ && r.browser.active", + "group": "navigation" + }, + { + "command": "r.browser.openExternal", + "when": "resourceScheme =~ /webview/ && r.browser.active", + "group": "navigation" + }, + { + "command": "editor.action.webvieweditor.showFind", + "when": "resourceScheme =~ /webview/ && r.browser.active", + "group": "navigation" + }, + { + "command": "editor.action.webvieweditor.showFind", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "command": "r.helpPanel.back", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "command": "r.helpPanel.forward", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "command": "r.helpPanel.openExternal", + "when": "resourceScheme =~ /webview/ && r.helpPanel.active", + "group": "navigation" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.toggleStyle" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.toggleFullWindow" + }, + { + "group": "httpgd", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.togglePreviewPlots" + }, + { + "group": "httpgd", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.exportPlot" + }, + { + "group": "navigation@01", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.prevPlot", + "alt": "r.plot.firstPlot" + }, + { + "group": "navigation@02", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.nextPlot", + "alt": "r.plot.lastPlot" + }, + { + "group": "navigation@03", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.hidePlot", + "alt": "r.plot.closePlot" + }, + { + "group": "navigation@04", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.resetPlots" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.zoomIn", + "alt": "r.plot.zoomOut" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.zoomOut", + "alt": "r.plot.zoomIn" + }, + { + "group": "navigation", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.openExternal" + }, + { + "group": "httpgd", + "when": "resourceScheme =~ /webview/ && r.plot.active", + "command": "r.plot.openUrl" + }, + { + "command": "r.rmarkdown.showPreviewToSide", + "alt": "r.rmarkdown.showPreview", + "when": "editorLangId == rmd && editorFocus", + "group": "navigation" + }, + { + "submenu": "r.knitCommands", + "when": "editorLangId == rmd && editorFocus", + "group": "@1" + }, + { + "command": "r.rmarkdown.setKnitDirectory", + "when": "editorLangId == rmd && editorFocus", + "group": "@1" + } + ], + "editor/context": [ + { + "command": "r.helpPanel.openForSelection", + "when": "resourceLangId == r" + }, + { + "command": "r.helpPanel.openForSelection", + "when": "resourceLangId == rmd" + } + ], + "view/item/context": [ + { + "command": "r.workspaceViewer.view", + "group": "inline", + "when": "view == workspaceViewer && viewItem == rootNode" + }, + { + "command": "r.workspaceViewer.remove", + "group": "inline", + "when": "view == workspaceViewer && viewItem == rootNode" + }, + { + "command": "r.helpPanel.searchPackage", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_searchPackage_/" + }, + { + "command": "r.helpPanel.openInNewPanel", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_openInNewPanel_/" + }, + { + "command": "r.helpPanel.clearCache", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_clearCache_/" + }, + { + "command": "r.helpPanel.addToFavorites", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_addToFavorites_/" + }, + { + "command": "r.helpPanel.removeFromFavorites", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_removeFromFavorites_/" + }, + { + "command": "r.helpPanel.showOnlyFavorites", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_showOnlyFavorites_/" + }, + { + "command": "r.helpPanel.showAllPackages", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_showAllPackages_/" + }, + { + "command": "r.helpPanel.removePackage", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_removePackage_/" + }, + { + "command": "r.helpPanel.updateInstalledPackages", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_updateInstalledPackages_/" + }, + { + "command": "r.helpPanel.updatePackage", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_updatePackage_/" + }, + { + "command": "r.helpPanel.installPackages", + "group": "inline@9", + "when": "view == rHelpPages && viewItem =~ /_installPackages_/" + }, + { + "command": "r.helpPanel.filterPackages", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_filterPackages_/" + }, + { + "command": "r.helpPanel.showQuickPick", + "group": "inline", + "when": "view == rHelpPages && viewItem =~ /_QUICKPICK_/" + }, + { + "command": "r.helpPanel.unsummarizeTopics", + "group": "inline@8", + "when": "view == rHelpPages && viewItem =~ /_unsummarizeTopics_/" + }, + { + "command": "r.helpPanel.summarizeTopics", + "group": "inline@8", + "when": "view == rHelpPages && viewItem =~ /_summarizeTopics_/" + }, + { + "command": "r.liveShare.toggle", + "when": "view == rLiveShare" + } + ], + "view/title": [ + { + "command": "r.workspaceViewer.load", + "group": "navigation@0", + "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" + }, + { + "command": "r.workspaceViewer.save", + "group": "navigation@1", + "when": "r.WorkspaceViewer:show && view == workspaceViewer && !r.liveShare:isGuest" + }, + { + "command": "r.workspaceViewer.clear", + "group": "navigation@2", + "when": "r.WorkspaceViewer:show && view == workspaceViewer" + }, + { + "command": "r.workspaceViewer.refreshEntry", + "group": "navigation@3", + "when": "r.WorkspaceViewer:show && view == workspaceViewer" + }, + { + "command": "r.helpPanel.showQuickPick", + "group": "navigation", + "when": "view == rHelpPages" + }, + { + "command": "r.liveShare.retry", + "group": "navigation@3", + "when": "view == rLiveShare && r.liveShare:aborted" + } + ], + "explorer/context": [ + { + "command": "r.rmarkdown.showPreview", + "when": "resourceLangId == rmd", + "group": "navigation" + } + ], + "r.knitCommands": [ + { + "command": "r.knitRmd" + }, + { + "command": "r.knitRmdToPdf" + }, + { + "command": "r.knitRmdToHtml" + }, + { + "command": "r.knitRmdToAll" + } + ], + "file/newFile": [ + { + "group": "R", + "command": "r.rmarkdown.newFileDraft" + }, + { + "group": "R", + "command": "r.newFileDocument" + } + ] + }, + "submenus": [ + { + "id": "r.knitCommands", + "label": "R: Knit", + "icon": "$(zap)" + } + ], + "configuration": { + "type": "object", + "title": "R", + "properties": { + "r.rpath.windows": { + "type": "string", + "default": "", + "markdownDescription": "Path to an R executable to launch R background processes (Windows). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rpath.mac": { + "type": "string", + "default": "", + "markdownDescription": "Path to an R executable to launch R background processes (macOS). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rpath.linux": { + "type": "string", + "default": "", + "markdownDescription": "Path to an R executable to launch R background processes (Linux). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.windows": { + "type": "string", + "default": "", + "markdownDescription": "R path for interactive terminals (Windows). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.mac": { + "type": "string", + "default": "", + "markdownDescription": "R path for interactive terminals (macOS). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.linux": { + "type": "string", + "default": "", + "markdownDescription": "R path for interactive terminals (Linux). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." + }, + "r.rterm.preferRadian": { + "type": "boolean", + "default": false, + "markdownDescription": "Prefer radian over vanilla R when radian is available on PATH. When `false` (default), vanilla R will be used." + }, + "r.rterm.option": { + "type": "array", + "default": [ + "--no-save", + "--no-restore" + ], + "description": "R command line options.", + "items": { + "type": "string" + } + }, + "r.libPaths": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "markdownDescription": "Additional library paths to launch R background processes (R languageserver, help server, etc.). These paths will be appended to `.libPaths()` on process startup. It could be useful for projects with [renv](https://rstudio.github.io/renv/index.html) enabled." + }, + "r.useRenvLibPath": { + "type": "boolean", + "default": false, + "markdownDescription": "Use renv library paths to launch R background processes (R languageserver, help server, etc.)." + }, + "r.lsp.enabled": { + "type": "boolean", + "default": true, + "description": "Enable the R language service to provide code analysis features (completion, signature, hover, diagnostics, definition, etc.)" + }, + "r.lsp.args": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "The command line arguments to use when launching R Language Server." + }, + "r.lsp.promptToInstall": { + "type": "boolean", + "default": true, + "description": "Prompt to install R Language Server if it is not installed." + }, + "r.lsp.debug": { + "type": "boolean", + "default": false, + "description": "Debug R Language Server." + }, + "r.lsp.diagnostics": { + "type": "boolean", + "default": true, + "description": "Enable diagnostics." + }, + "r.lsp.lang": { + "type": "string", + "default": "", + "markdownDescription": "Override default `LANG` environment variable." + }, + "r.lsp.use_stdio": { + "type": "boolean", + "default": false, + "description": "Use STDIO connection instead of TCP. (Unix/macOS users only)" + }, + "r.lsp.multiServer": { + "type": "boolean", + "default": true, + "markdownDescription": "Use multiple language servers for [multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces). If disabled, only one language server will be used to handle all requests from all workspaces and files." + }, + "r.rmarkdown.codeLensCommands": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "r.selectCurrentChunk", + "r.runCurrentChunk", + "r.runCurrentChunkAndMove", + "r.runAboveChunks", + "r.runCurrentAndBelowChunks", + "r.runBelowChunks", + "r.runAllChunks", + "r.runPreviousChunk", + "r.runNextChunk", + "r.goToPreviousChunk", + "r.goToNextChunk" ] + }, + "default": [ + "r.runCurrentChunk", + "r.runAboveChunks" + ], + "description": "Customize RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk' shown on the first line of each code chunk. \nCustomize both the commands AND its orders (that is, CodeLens respect user-specified orders):" }, - "submenus": [ - { - "id": "r.knitCommands", - "label": "R: Knit", - "icon": "$(zap)" - } - ], - "configuration": { - "type": "object", - "title": "R", - "properties": { - "r.rpath.windows": { - "type": "string", - "default": "", - "markdownDescription": "Path to an R executable to launch R background processes (Windows). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rpath.mac": { - "type": "string", - "default": "", - "markdownDescription": "Path to an R executable to launch R background processes (macOS). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rpath.linux": { - "type": "string", - "default": "", - "markdownDescription": "Path to an R executable to launch R background processes (Linux). Must be \"vanilla\" R, not radian etc.! Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.windows": { - "type": "string", - "default": "", - "markdownDescription": "R path for interactive terminals (Windows). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.mac": { - "type": "string", - "default": "", - "markdownDescription": "R path for interactive terminals (macOS). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.linux": { - "type": "string", - "default": "", - "markdownDescription": "R path for interactive terminals (Linux). Can also be radian etc. Some variables defined in such as `${userHome}`, `${workspaceFolder}`, `${fileWorkspaceFolder}`, and `${fileDirname}` are supported." - }, - "r.rterm.preferRadian": { - "type": "boolean", - "default": false, - "markdownDescription": "Prefer radian over vanilla R when radian is available on PATH. When `false` (default), vanilla R will be used." - }, - "r.rterm.option": { - "type": "array", - "default": [ - "--no-save", - "--no-restore" - ], - "description": "R command line options.", - "items": { - "type": "string" - } - }, - "r.libPaths": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "markdownDescription": "Additional library paths to launch R background processes (R languageserver, help server, etc.). These paths will be appended to `.libPaths()` on process startup. It could be useful for projects with [renv](https://rstudio.github.io/renv/index.html) enabled." - }, - "r.useRenvLibPath": { - "type": "boolean", - "default": false, - "markdownDescription": "Use renv library paths to launch R background processes (R languageserver, help server, etc.)." - }, - "r.lsp.enabled": { - "type": "boolean", - "default": true, - "description": "Enable the R language service to provide code analysis features (completion, signature, hover, diagnostics, definition, etc.)" - }, - "r.lsp.args": { - "type": "array", - "items": { - "type": "string" - }, - "default": [], - "description": "The command line arguments to use when launching R Language Server." - }, - "r.lsp.promptToInstall": { - "type": "boolean", - "default": true, - "description": "Prompt to install R Language Server if it is not installed." - }, - "r.lsp.debug": { - "type": "boolean", - "default": false, - "description": "Debug R Language Server." - }, - "r.lsp.diagnostics": { - "type": "boolean", - "default": true, - "description": "Enable diagnostics." - }, - "r.lsp.lang": { - "type": "string", - "default": "", - "markdownDescription": "Override default `LANG` environment variable." - }, - "r.lsp.use_stdio": { - "type": "boolean", - "default": false, - "description": "Use STDIO connection instead of TCP. (Unix/macOS users only)" - }, - "r.lsp.multiServer": { - "type": "boolean", - "default": true, - "markdownDescription": "Use multiple language servers for [multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces). If disabled, only one language server will be used to handle all requests from all workspaces and files." - }, - "r.rmarkdown.codeLensCommands": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "r.selectCurrentChunk", - "r.runCurrentChunk", - "r.runCurrentChunkAndMove", - "r.runAboveChunks", - "r.runCurrentAndBelowChunks", - "r.runBelowChunks", - "r.runAllChunks", - "r.runPreviousChunk", - "r.runNextChunk", - "r.goToPreviousChunk", - "r.goToNextChunk" - ] - }, - "default": [ - "r.runCurrentChunk", - "r.runAboveChunks" - ], - "description": "Customize RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk' shown on the first line of each code chunk. \nCustomize both the commands AND its orders (that is, CodeLens respect user-specified orders):" - }, - "r.rmarkdown.enableCodeLens": { - "type": "boolean", - "default": true, - "markdownDescription": "Enable RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk | Run Above' shown on the first line of each code chunk.\n\n- Click the buttons to run commands.\n- Hover on the buttons to show tooltips.\n- CodeLens commands are customizable via `#r.rmarkdown.codeLensCommands#` or settings.json `r.rmarkdown.codeLensCommands`" - }, - "r.rmarkdown.chunkBackgroundColor": { - "type": "string", - "default": "rgba(128, 128, 128, 0.1)", - "description": "RMarkdown chunk background color in RGBA or RGB value. Defaults to rgba(128, 128, 128, 0.1). Leave it empty to disable it (use default editor background color). Reload VS Code after changing settings.\n\nLearn how to set colors: https://www.w3schools.com/css/css_colors_rgb.asp.\n\nExamples for syntax rgba(, , , ):\nrgba(128, 128, 128, 0.1)\nrgba(128, 128, 128, 0.3)\nrgba(255, 165, 0, 0.1)\n\n" - }, - "r.rmarkdown.preview.autoRefresh": { - "type": "boolean", - "default": true, - "markdownDescription": "Enable automatic refresh of R Markdown preview on file update." - }, - "r.rmarkdown.preview.zoom": { - "type": "number", - "default": 1, - "markdownDescription": "Controls the zoom of the R Markdown preview." - }, - "r.rmarkdown.knit.useBackgroundProcess": { - "type": "boolean", - "default": true, - "markdownDescription": "Should knitting occur in a background process (*smart knitting*), or should it be done in the current R terminal (*manual knitting*)? \n\n*Smart knitting* includes additional features, such as custom knit function detection, R Markdown site detection, progress bars, and the setting knit directory." - }, - "r.rmarkdown.knit.focusOutputChannel": { - "type": "boolean", - "default": true, - "markdownDescription": "Should the R Markdown output channel be focused when knitting?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." - }, - "r.rmarkdown.knit.openOutputFile": { - "type": "boolean", - "default": false, - "markdownDescription": "Should the output file be opened automatically when using knit?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." - }, - "r.rmarkdown.knit.command": { - "type": "string", - "default": "rmarkdown::render", - "markdownDescription": "Command used to knit a Rmd file if not specified by the frontmatter." - }, - "r.rmarkdown.knit.defaults.knitWorkingDirectory": { - "type": "string", - "default": "document directory", - "enum": [ - "document directory", - "workspace root" - ], - "enumDescriptions": [ - "Use the document's directory as the knit directory", - "Use the workspace root as the knit directory" - ], - "markdownDescription": "What working directory should R Markdown chunks be evaluated in? Default knit behaviour is to use the document's directory as root.\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`.", - "additionalItems": false, - "additionalProperties": false - }, - "r.helpPanel.enableSyntaxHighlighting": { - "type": "boolean", - "default": true, - "description": "Enable syntax highlighting in the help panel." - }, - "r.helpPanel.cacheIndexFiles": { - "type": "string", - "enum": [ - "None", - "Workspace", - "Global" - ], - "description": "Whether/where to store parsed help indices between sessions.", - "enumDescriptions": [ - "Do not store anything", - "Store on a per workspace basis", - "Store globally" - ], - "default": "None" - }, - "r.helpPanel.previewLocalPackages": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "." - ], - "markdownDescription": "Which local directories to try for local help pages previewer. Set to `[]` to disable." - }, - "r.helpPanel.rpath": { - "type": "string", - "default": "", - "markdownDescription": "DEPRECATED! Path to an R executable. Must be \"vanilla\" R, not radian etc.! Will be read from registry or path if not set.", - "markdownDeprecationMessage": "Will be deprecated. Use `#r.rpath.windows#`, `#r.rpath.mac#`, or `#r.rpath.linux#` instead.", - "deprecationMessage": "Will be deprecated. Use r.rpath.windows, r.rpath.mac, or r.rpath.linux instead." - }, - "r.helpPanel.enableHoverLinks": { - "type": "boolean", - "default": true, - "markdownDescription": "Show links to matching help pages in hover" - }, - "r.helpPanel.clickCodeExamples": { - "type": "object", - "markdownDescription": "What happens when clicking code examples on help pages. Might require restarting to take effect.", - "default": { - "Click": "Copy", - "Ctrl+Click": "Run", - "Shift+Click": "Ignore" - }, - "properties": { - "Click": { - "type": "string", - "default": "Copy", - "enum": [ - "Ignore", - "Copy", - "Run" - ], - "enumDescriptions": [ - "Do nothing", - "Copy the code to the clipboard", - "Run the code in the terminal" - ] - }, - "Ctrl+Click": { - "type": "string", - "default": "Run", - "enum": [ - "Ignore", - "Copy", - "Run" - ], - "enumDescriptions": [ - "Do nothing", - "Copy the code to the clipboard", - "Run the code in the terminal" - ] - }, - "Shift+Click": { - "type": "string", - "default": "Ignore", - "enum": [ - "Ignore", - "Copy", - "Run" - ], - "enumDescriptions": [ - "Do nothing", - "Copy the code to the clipboard", - "Run the code in the terminal" - ] - } - }, - "additionalProperties": false - }, - "r.source.encoding": { - "type": "string", - "default": "UTF-8", - "markdownDescription": "An optional encoding to pass to R when executing the file, i.e. `source(FILE, encoding=ENCODING)`." - }, - "r.source.echo": { - "type": "boolean", - "default": false, - "markdownDescription": "Should the file be executed with echo option set to TRUE by default, i.e. `source(FILE, echo=TRUE)`?" - }, - "r.source.focus": { - "type": "string", - "default": "editor", - "enum": [ - "editor", - "terminal", - "none" - ], - "enumDescriptions": [ - "Focus editor when sending code to terminal", - "Focus terminal when sending code to terminal", - "Do not show terminal when sending code to terminal" - ], - "description": "What to show/focus after sending code to terminal." - }, - "r.alwaysUseActiveTerminal": { - "type": "boolean", - "default": false, - "description": "Use active terminal for all commands, rather than creating a new R terminal." - }, - "r.bracketedPaste": { - "type": "boolean", - "default": false, - "markdownDescription": "Use bracketed paste mode when sending code to terminal. Enable for [radian](https://github.com/randy3k/radian) console." - }, - "r.removeLeadingComments": { - "type": "boolean", - "default": false, - "description": "Remove leading comments when sending code to terminal." - }, - "r.sessionWatcher": { - "type": "boolean", - "default": true, - "description": "Enable R session watcher. Required for workspace viewer and most features to work with an R session. Restart required to take effect." - }, - "r.session.useWebServer": { - "type": "boolean", - "default": false, - "markdownDescription": "Enable experimental use of web server in the R session to handle session requests from the extension. Changes the option `vsc.use_webserver` in R. Requires `#r.sessionWatcher#` to be set to `true`. Requires the `httpuv` R package." - }, - "r.session.watchGlobalEnvironment": { - "type": "boolean", - "default": true, - "markdownDescription": "Watch the global environment to provide hover, autocompletions, and workspace viewer information. Changes the option `vsc.globalenv` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.objectLengthLimit": { - "type": "integer", - "default": 2000, - "markdownDescription": "The upper limit of object length to show object details in workspace viewer and provide session symbol completion. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_length_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.objectTimeout": { - "type": "integer", - "default": 50, - "markdownDescription": "The maximum number of milliseconds to get information of a single object in the global environment. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_timeout` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.levelOfObjectDetail": { - "type": "string", - "markdownDescription": "How much of the object to show on hover, autocompletion, and in the workspace viewer? Changes the option `vsc.str.max.level` in R. Requires `#r.sessionWatcher#` to be set to `true`.", - "default": "Minimal", - "enum": [ - "Minimal", - "Normal", - "Detailed" - ], - "enumDescriptions": [ - "Display literal values and object types only.", - "Display the top level of list content, data frame column values, and example values.", - "Display the top two levels of list content, data frame column values, and example values. This option may cause notable delay after each user input in the terminal." - ] - }, - "r.session.emulateRStudioAPI": { - "type": "boolean", - "default": true, - "markdownDescription": "Emulate the RStudio API for addin support and other {rstudioapi} calls. Changes the option `vsc.rstudioapi` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.data.rowLimit": { - "type": "integer", - "default": 0, - "markdownDescription": "The maximum number of rows to be displayed in the data viewer. `0` means no limit. Changes the option `vsc.row_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." - }, - "r.session.data.pageSize": { - "type": "integer", - "default": 500, - "markdownDescription": "The maximum number of rows per page in the data viewer. `0` means to disable pagination." - }, - "r.session.viewers.viewColumn": { - "type": "object", - "markdownDescription": "Which view column should R-related webviews be displayed? Requires `#r.sessionWatcher#` to be set to `true`.", - "default": { - "plot": "Two", - "browser": "Active", - "viewer": "Two", - "pageViewer": "Active", - "view": "Two", - "helpPanel": "Two" - }, - "properties": { - "plot": { - "type": "string", - "description": "Which view column to show the plot file on graphics update? \n\nChanges the option 'vsc.plot' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display plots in editor group 2.", - "Display plots in the active editor.", - "Display plots beside the active editor.", - "Do not use the VSCode-R plot viewer." - ], - "default": "Two" - }, - "browser": { - "type": "string", - "description": "Which view column to show the WebView triggered by browser (e.g. shiny apps)? \n\nChanges the option 'vsc.browser' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display browser in editor group 2.", - "Display browser in the active editor.", - "Display browser beside the active editor.", - "Do not use the VSCode-R browser." - ], - "default": "Active" - }, - "viewer": { - "type": "string", - "description": "Which view column to show the WebView triggered by viewer (e.g. htmlwidgets)? \n\nChanges the option 'vsc.viewer' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display viewer in editor group 2.", - "Display viewer in the active editor.", - "Display viewer beside the active editor.", - "Do not use the VSCode-R viewer." - ], - "default": "Two" - }, - "pageViewer": { - "type": "string", - "description": "Which view column to show the WebView triggered by the page viewer (e.g. profvis)? \n\nChanges the option 'vsc.page_viewer' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display page viewer in editor group 2.", - "Display page viewer in the active editor.", - "Display page viewer beside the active editor.", - "Do not use the VSCode-R page viewer." - ], - "default": "Active" - }, - "view": { - "type": "string", - "description": "Which view column to show the WebView triggered by View()? \n\nChanges the option 'vsc.view' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display view output in editor group 2.", - "Display view output in the active editor.", - "Display view output beside the active editor.", - "Do not use the VSCode-R view command." - ], - "default": "Two" - }, - "helpPanel": { - "type": "string", - "description": "Which view column to show the WebView triggered by the help panel? \n\nChanges the option 'vsc.help_panel' in R.", - "enum": [ - "Two", - "Active", - "Beside", - "Disable" - ], - "enumDescriptions": [ - "Display help panel in editor group 2.", - "Display help panel in the active editor.", - "Display help panel beside the active editor.", - "Do not use the VSCode-R help panel." - ], - "default": "Two" - } - }, - "additionalProperties": false - }, - "r.rtermSendDelay": { - "type": "integer", - "default": 8, - "markdownDescription": "Delay in milliseconds before sending each line to rterm. Requires `#r.bracketedPaste#` to be `false`." - }, - "r.workspaceViewer.showObjectSize": { - "type": "boolean", - "default": false, - "markdownDescription": "Show object size when hovering over a workspace viewer item. Changes the option `vsc.show_object_size` in R." - }, - "r.workspaceViewer.removeHiddenItems": { - "type": "boolean", - "default": false, - "description": "Remove hidden items when clearing workspace." - }, - "r.workspaceViewer.clearPrompt": { - "type": "boolean", - "default": true, - "description": "Prompt the user for confirmation when clearing the workspace." - }, - "r.liveShare.timeout": { - "type": "integer", - "default": 10000, - "description": "Time in milliseconds before aborting attempt to connect to Live Share API." - }, - "r.liveShare.defaults.commandForward": { - "type": "boolean", - "default": false, - "description": "Default boolean value for guest command forwarding." - }, - "r.liveShare.defaults.shareWorkspace": { - "type": "boolean", - "default": true, - "description": "Default boolean value for sharing the R workspace with guests." - }, - "r.liveShare.defaults.shareBrowser": { - "type": "boolean", - "default": false, - "description": "Default boolean value for automatically sharing R browser ports with guests." - }, - "r.plot.devArgs": { - "type": "object", - "markdownDescription": "The arguments for the png device to replay user graphics to show in VSCode. Requires `#r.plot.useHttpgd#` to be set to `false`. \n\nChanges the option `vsc.dev.args` in R.", - "default": { - "width": 800, - "height": 1200 - }, - "properties": { - "width": { - "type": "number", - "description": "Width of the graphic device.", - "default": 480 - }, - "height": { - "type": "number", - "description": "Height of the graphic device.", - "default": 480 - }, - "units": { - "type": "string", - "default": "px" - }, - "pointsize": { - "type": "number", - "default": 12 - }, - "bg": { - "type": "string", - "default": "white" - } - }, - "additionalProperties": false - }, - "r.plot.useHttpgd": { - "type": "boolean", - "default": false, - "markdownDescription": "Use the httpgd-based plot viewer instead of the base VSCode-R plot viewer. Changes the option `vsc.use_httpgd` in R.\n\nRequires the `httpgd` R package version 1.2.0 or later." - }, - "r.plot.defaults.colorTheme": { - "type": "string", - "default": "original", - "enum": [ - "vscode", - "original" - ], - "markdownEnumDescriptions": [ - "Match background and primary stroke color to the current color theme (Or apply custom CSS overwrites, if specified in `#r.plot.customStyleOverwrites#`)", - "Use original colors" - ], - "markdownDescription": "Which color theme to use when launching the httpgd plot viewer." - }, - "r.plot.defaults.plotPreviewLayout": { - "type": "string", - "default": "multirow", - "enum": [ - "multirow", - "scroll", - "hidden" - ], - "enumDescriptions": [ - "Show in multiple rows", - "Show scrollbar", - "Don't show preview plots" - ], - "markdownDescription": "How to display plot previews if more than one row required." - }, - "r.plot.defaults.fullWindowMode": { - "type": "boolean", - "default": false, - "markdownDescription": "Whether to use full window mode when launching the httpgd plot viewer." - }, - "r.plot.timing.resizeInterval": { - "type": "number", - "default": 100, - "markdownDescription": "Interval in ms to wait between plot resizes." - }, - "r.plot.timing.refreshInterval": { - "type": "number", - "default": 10, - "markdownDescription": "Interval in ms to wait between plot refreshs." - }, - "r.plot.customStyleOverwrites": { - "type": "string", - "default": "", - "markdownDescription": "Path to a custom CSS file to be used when `#r.plot.defaults.colorTheme#` is `vscode`. Replaces the default CSS overwrites!" - } - } + "r.rmarkdown.enableCodeLens": { + "type": "boolean", + "default": true, + "markdownDescription": "Enable RMarkdown CodeLens, which are inline commands/buttons e.g. 'Run Chunk | Run Above' shown on the first line of each code chunk.\n\n- Click the buttons to run commands.\n- Hover on the buttons to show tooltips.\n- CodeLens commands are customizable via `#r.rmarkdown.codeLensCommands#` or settings.json `r.rmarkdown.codeLensCommands`" + }, + "r.rmarkdown.chunkBackgroundColor": { + "type": "string", + "default": "rgba(128, 128, 128, 0.1)", + "description": "RMarkdown chunk background color in RGBA or RGB value. Defaults to rgba(128, 128, 128, 0.1). Leave it empty to disable it (use default editor background color). Reload VS Code after changing settings.\n\nLearn how to set colors: https://www.w3schools.com/css/css_colors_rgb.asp.\n\nExamples for syntax rgba(, , , ):\nrgba(128, 128, 128, 0.1)\nrgba(128, 128, 128, 0.3)\nrgba(255, 165, 0, 0.1)\n\n" + }, + "r.rmarkdown.preview.autoRefresh": { + "type": "boolean", + "default": true, + "markdownDescription": "Enable automatic refresh of R Markdown preview on file update." + }, + "r.rmarkdown.preview.zoom": { + "type": "number", + "default": 1, + "markdownDescription": "Controls the zoom of the R Markdown preview." + }, + "r.rmarkdown.knit.useBackgroundProcess": { + "type": "boolean", + "default": true, + "markdownDescription": "Should knitting occur in a background process (*smart knitting*), or should it be done in the current R terminal (*manual knitting*)? \n\n*Smart knitting* includes additional features, such as custom knit function detection, R Markdown site detection, progress bars, and the setting knit directory." + }, + "r.rmarkdown.knit.focusOutputChannel": { + "type": "boolean", + "default": true, + "markdownDescription": "Should the R Markdown output channel be focused when knitting?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." + }, + "r.rmarkdown.knit.openOutputFile": { + "type": "boolean", + "default": false, + "markdownDescription": "Should the output file be opened automatically when using knit?\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`." }, - "configurationDefaults": { - "[r]": { - "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",<>/" + "r.rmarkdown.knit.command": { + "type": "string", + "default": "rmarkdown::render", + "markdownDescription": "Command used to knit a Rmd file if not specified by the frontmatter." + }, + "r.rmarkdown.knit.defaults.knitWorkingDirectory": { + "type": "string", + "default": "document directory", + "enum": [ + "document directory", + "workspace root" + ], + "enumDescriptions": [ + "Use the document's directory as the knit directory", + "Use the workspace root as the knit directory" + ], + "markdownDescription": "What working directory should R Markdown chunks be evaluated in? Default knit behaviour is to use the document's directory as root.\n\nRequires `#r.rmarkdown.knit.useBackgroundProcess#` to be set to `true`.", + "additionalItems": false, + "additionalProperties": false + }, + "r.helpPanel.enableSyntaxHighlighting": { + "type": "boolean", + "default": true, + "description": "Enable syntax highlighting in the help panel." + }, + "r.helpPanel.cacheIndexFiles": { + "type": "string", + "enum": [ + "None", + "Workspace", + "Global" + ], + "description": "Whether/where to store parsed help indices between sessions.", + "enumDescriptions": [ + "Do not store anything", + "Store on a per workspace basis", + "Store globally" + ], + "default": "None" + }, + "r.helpPanel.previewLocalPackages": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "." + ], + "markdownDescription": "Which local directories to try for local help pages previewer. Set to `[]` to disable." + }, + "r.helpPanel.rpath": { + "type": "string", + "default": "", + "markdownDescription": "DEPRECATED! Path to an R executable. Must be \"vanilla\" R, not radian etc.! Will be read from registry or path if not set.", + "markdownDeprecationMessage": "Will be deprecated. Use `#r.rpath.windows#`, `#r.rpath.mac#`, or `#r.rpath.linux#` instead.", + "deprecationMessage": "Will be deprecated. Use r.rpath.windows, r.rpath.mac, or r.rpath.linux instead." + }, + "r.helpPanel.enableHoverLinks": { + "type": "boolean", + "default": true, + "markdownDescription": "Show links to matching help pages in hover" + }, + "r.helpPanel.clickCodeExamples": { + "type": "object", + "markdownDescription": "What happens when clicking code examples on help pages. Might require restarting to take effect.", + "default": { + "Click": "Copy", + "Ctrl+Click": "Run", + "Shift+Click": "Ignore" + }, + "properties": { + "Click": { + "type": "string", + "default": "Copy", + "enum": [ + "Ignore", + "Copy", + "Run" + ], + "enumDescriptions": [ + "Do nothing", + "Copy the code to the clipboard", + "Run the code in the terminal" + ] + }, + "Ctrl+Click": { + "type": "string", + "default": "Run", + "enum": [ + "Ignore", + "Copy", + "Run" + ], + "enumDescriptions": [ + "Do nothing", + "Copy the code to the clipboard", + "Run the code in the terminal" + ] + }, + "Shift+Click": { + "type": "string", + "default": "Ignore", + "enum": [ + "Ignore", + "Copy", + "Run" + ], + "enumDescriptions": [ + "Do nothing", + "Copy the code to the clipboard", + "Run the code in the terminal" + ] } + }, + "additionalProperties": false + }, + "r.source.encoding": { + "type": "string", + "default": "UTF-8", + "markdownDescription": "An optional encoding to pass to R when executing the file, i.e. `source(FILE, encoding=ENCODING)`." + }, + "r.source.echo": { + "type": "boolean", + "default": false, + "markdownDescription": "Should the file be executed with echo option set to TRUE by default, i.e. `source(FILE, echo=TRUE)`?" + }, + "r.source.focus": { + "type": "string", + "default": "editor", + "enum": [ + "editor", + "terminal", + "none" + ], + "enumDescriptions": [ + "Focus editor when sending code to terminal", + "Focus terminal when sending code to terminal", + "Do not show terminal when sending code to terminal" + ], + "description": "What to show/focus after sending code to terminal." }, - "taskDefinitions": [ - { - "type": "R", - "required": [ - "code" - ], - "properties": { - "code": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "x <- 'Hello, World!'", - "print(x)" - ], - "description": "R code to be executed" - }, - "options": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "--no-echo", - "--no-restore" - ], - "description": "Command line options used to invoke R. (see R --help)" - }, - "cwd": { - "type": "string", - "default": "${workspaceRoot}", - "description": "The current working directory of the executed program or shell. If omitted, the current workspace root will be used." - }, - "env": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "default": {}, - "description": "The environment of the executed program or shell. If omitted, the current process environment will be used." - } - } + "r.alwaysUseActiveTerminal": { + "type": "boolean", + "default": false, + "description": "Use active terminal for all commands, rather than creating a new R terminal." + }, + "r.bracketedPaste": { + "type": "boolean", + "default": false, + "markdownDescription": "Use bracketed paste mode when sending code to terminal. Enable for [radian](https://github.com/randy3k/radian) console." + }, + "r.removeLeadingComments": { + "type": "boolean", + "default": false, + "description": "Remove leading comments when sending code to terminal." + }, + "r.sessionWatcher": { + "type": "boolean", + "default": true, + "description": "Enable R session watcher. Required for workspace viewer and most features to work with an R session. Restart required to take effect." + }, + "r.session.useWebServer": { + "type": "boolean", + "default": false, + "markdownDescription": "Enable experimental use of web server in the R session to handle session requests from the extension. Changes the option `vsc.use_webserver` in R. Requires `#r.sessionWatcher#` to be set to `true`. Requires the `httpuv` R package." + }, + "r.session.watchGlobalEnvironment": { + "type": "boolean", + "default": true, + "markdownDescription": "Watch the global environment to provide hover, autocompletions, and workspace viewer information. Changes the option `vsc.globalenv` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.objectLengthLimit": { + "type": "integer", + "default": 2000, + "markdownDescription": "The upper limit of object length to show object details in workspace viewer and provide session symbol completion. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_length_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.objectTimeout": { + "type": "integer", + "default": 50, + "markdownDescription": "The maximum number of milliseconds to get information of a single object in the global environment. Decrease this value if you experience significant delay after executing R commands caused by large global objects with many elements. Changes the option `vsc.object_timeout` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.levelOfObjectDetail": { + "type": "string", + "markdownDescription": "How much of the object to show on hover, autocompletion, and in the workspace viewer? Changes the option `vsc.str.max.level` in R. Requires `#r.sessionWatcher#` to be set to `true`.", + "default": "Minimal", + "enum": [ + "Minimal", + "Normal", + "Detailed" + ], + "enumDescriptions": [ + "Display literal values and object types only.", + "Display the top level of list content, data frame column values, and example values.", + "Display the top two levels of list content, data frame column values, and example values. This option may cause notable delay after each user input in the terminal." + ] + }, + "r.session.emulateRStudioAPI": { + "type": "boolean", + "default": true, + "markdownDescription": "Emulate the RStudio API for addin support and other {rstudioapi} calls. Changes the option `vsc.rstudioapi` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.data.rowLimit": { + "type": "integer", + "default": 0, + "markdownDescription": "The maximum number of rows to be displayed in the data viewer. `0` means no limit. Changes the option `vsc.row_limit` in R. Requires `#r.sessionWatcher#` to be set to `true`." + }, + "r.session.data.pageSize": { + "type": "integer", + "default": 500, + "markdownDescription": "The maximum number of rows per page in the data viewer. `0` means to disable pagination." + }, + "r.session.viewers.viewColumn": { + "type": "object", + "markdownDescription": "Which view column should R-related webviews be displayed? Requires `#r.sessionWatcher#` to be set to `true`.", + "default": { + "plot": "Two", + "browser": "Active", + "viewer": "Two", + "pageViewer": "Active", + "view": "Two", + "helpPanel": "Two" + }, + "properties": { + "plot": { + "type": "string", + "description": "Which view column to show the plot file on graphics update? \n\nChanges the option 'vsc.plot' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display plots in editor group 2.", + "Display plots in the active editor.", + "Display plots beside the active editor.", + "Do not use the VSCode-R plot viewer." + ], + "default": "Two" + }, + "browser": { + "type": "string", + "description": "Which view column to show the WebView triggered by browser (e.g. shiny apps)? \n\nChanges the option 'vsc.browser' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display browser in editor group 2.", + "Display browser in the active editor.", + "Display browser beside the active editor.", + "Do not use the VSCode-R browser." + ], + "default": "Active" + }, + "viewer": { + "type": "string", + "description": "Which view column to show the WebView triggered by viewer (e.g. htmlwidgets)? \n\nChanges the option 'vsc.viewer' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display viewer in editor group 2.", + "Display viewer in the active editor.", + "Display viewer beside the active editor.", + "Do not use the VSCode-R viewer." + ], + "default": "Two" + }, + "pageViewer": { + "type": "string", + "description": "Which view column to show the WebView triggered by the page viewer (e.g. profvis)? \n\nChanges the option 'vsc.page_viewer' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display page viewer in editor group 2.", + "Display page viewer in the active editor.", + "Display page viewer beside the active editor.", + "Do not use the VSCode-R page viewer." + ], + "default": "Active" + }, + "view": { + "type": "string", + "description": "Which view column to show the WebView triggered by View()? \n\nChanges the option 'vsc.view' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display view output in editor group 2.", + "Display view output in the active editor.", + "Display view output beside the active editor.", + "Do not use the VSCode-R view command." + ], + "default": "Two" + }, + "helpPanel": { + "type": "string", + "description": "Which view column to show the WebView triggered by the help panel? \n\nChanges the option 'vsc.help_panel' in R.", + "enum": [ + "Two", + "Active", + "Beside", + "Disable" + ], + "enumDescriptions": [ + "Display help panel in editor group 2.", + "Display help panel in the active editor.", + "Display help panel beside the active editor.", + "Do not use the VSCode-R help panel." + ], + "default": "Two" } - ], - "problemMatchers": [ - { - "name": "testthat", - "owner": "R", - "severity": "error", - "fileLocation": [ - "relative", - "${workspaceFolder}/tests/testthat" - ], - "pattern": [ - { - "regexp": "^[-─ ]*(Failure|Error)\\s\\((.*\\.[Rr]):(\\d+):?(\\d+)?\\):\\s(.*)", - "file": 2, - "line": 3, - "column": 4, - "message": 5 - }, - { - "regexp": "^(.*)$", - "message": 1 - } - ] + }, + "additionalProperties": false + }, + "r.rtermSendDelay": { + "type": "integer", + "default": 8, + "markdownDescription": "Delay in milliseconds before sending each line to rterm. Requires `#r.bracketedPaste#` to be `false`." + }, + "r.workspaceViewer.showObjectSize": { + "type": "boolean", + "default": false, + "markdownDescription": "Show object size when hovering over a workspace viewer item. Changes the option `vsc.show_object_size` in R." + }, + "r.workspaceViewer.removeHiddenItems": { + "type": "boolean", + "default": false, + "description": "Remove hidden items when clearing workspace." + }, + "r.workspaceViewer.clearPrompt": { + "type": "boolean", + "default": true, + "description": "Prompt the user for confirmation when clearing the workspace." + }, + "r.liveShare.timeout": { + "type": "integer", + "default": 10000, + "description": "Time in milliseconds before aborting attempt to connect to Live Share API." + }, + "r.liveShare.defaults.commandForward": { + "type": "boolean", + "default": false, + "description": "Default boolean value for guest command forwarding." + }, + "r.liveShare.defaults.shareWorkspace": { + "type": "boolean", + "default": true, + "description": "Default boolean value for sharing the R workspace with guests." + }, + "r.liveShare.defaults.shareBrowser": { + "type": "boolean", + "default": false, + "description": "Default boolean value for automatically sharing R browser ports with guests." + }, + "r.plot.devArgs": { + "type": "object", + "markdownDescription": "The arguments for the png device to replay user graphics to show in VSCode. Requires `#r.plot.useHttpgd#` to be set to `false`. \n\nChanges the option `vsc.dev.args` in R.", + "default": { + "width": 800, + "height": 1200 + }, + "properties": { + "width": { + "type": "number", + "description": "Width of the graphic device.", + "default": 480 + }, + "height": { + "type": "number", + "description": "Height of the graphic device.", + "default": 480 + }, + "units": { + "type": "string", + "default": "px" + }, + "pointsize": { + "type": "number", + "default": 12 + }, + "bg": { + "type": "string", + "default": "white" } - ] - }, - "scripts": { - "vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production", - "changelog": "npx git-cliff v2.8.5.. -o", - "build": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none", - "watch": "webpack --mode none --watch", - "watchHelp": "tsc -p ./html/help --watch", - "watchHttpgd": "tsc -p ./html/httpgd --watch", - "pretest": "tsc -p ./", - "test": "node ./out/test/runTest.js", - "lint": "eslint src --ext ts" - }, - "devDependencies": { - "@types/cheerio": "^0.22.29", - "@types/ejs": "^3.0.6", - "@types/express": "^4.17.12", - "@types/fs-extra": "^9.0.11", - "@types/glob": "^8.0.0", - "@types/highlight.js": "^10.1.0", - "@types/js-yaml": "^4.0.2", - "@types/mocha": "^8.2.2", - "@types/node": "^18.17.1", - "@types/node-fetch": "^2.5.10", - "@types/sinon": "^10.0.13", - "@types/vscode": "^1.75.0", - "@types/winreg": "^1.2.31", - "@typescript-eslint/eslint-plugin": "^5.30.0", - "@typescript-eslint/parser": "^5.30.0", - "@vscode/test-electron": "^2.2.3", - "copy-webpack-plugin": "^9.0.0", - "eslint": "^7.28.0", - "eslint-plugin-jsdoc": "^35.1.3", - "git-cliff": "^2.8.0", - "mocha": "^11.1.0", - "sinon": "^15.0.1", - "ts-loader": "^9.3.1", - "typescript": "^4.7.2", - "webpack": "^5.99.6", - "webpack-cli": "^4.10.0" + }, + "additionalProperties": false + }, + "r.plot.useHttpgd": { + "type": "boolean", + "default": false, + "markdownDescription": "Use the httpgd-based plot viewer instead of the base VSCode-R plot viewer. Changes the option `vsc.use_httpgd` in R.\n\nRequires the `httpgd` R package version 1.2.0 or later." + }, + "r.plot.defaults.colorTheme": { + "type": "string", + "default": "original", + "enum": [ + "vscode", + "original" + ], + "markdownEnumDescriptions": [ + "Match background and primary stroke color to the current color theme (Or apply custom CSS overwrites, if specified in `#r.plot.customStyleOverwrites#`)", + "Use original colors" + ], + "markdownDescription": "Which color theme to use when launching the httpgd plot viewer." + }, + "r.plot.defaults.plotPreviewLayout": { + "type": "string", + "default": "multirow", + "enum": [ + "multirow", + "scroll", + "hidden" + ], + "enumDescriptions": [ + "Show in multiple rows", + "Show scrollbar", + "Don't show preview plots" + ], + "markdownDescription": "How to display plot previews if more than one row required." + }, + "r.plot.defaults.fullWindowMode": { + "type": "boolean", + "default": false, + "markdownDescription": "Whether to use full window mode when launching the httpgd plot viewer." + }, + "r.plot.timing.resizeInterval": { + "type": "number", + "default": 100, + "markdownDescription": "Interval in ms to wait between plot resizes." + }, + "r.plot.timing.refreshInterval": { + "type": "number", + "default": 10, + "markdownDescription": "Interval in ms to wait between plot refreshs." + }, + "r.plot.customStyleOverwrites": { + "type": "string", + "default": "", + "markdownDescription": "Path to a custom CSS file to be used when `#r.plot.defaults.colorTheme#` is `vscode`. Replaces the default CSS overwrites!" + } + } }, - "dependencies": { - "ag-grid-community": "^31.3.2", - "cheerio": "1.0.0-rc.12", - "crypto": "^1.0.1", - "ejs": "^3.1.10", - "fs-extra": "^10.0.0", - "highlight.js": "^11.9.0", - "httpgd": "0.1.6", - "jquery": "^3.7.1", - "jquery.json-viewer": "^1.5.0", - "js-yaml": "^4.1.0", - "node-fetch": "^2.6.7", - "vscode-languageclient": "^9.0.1", - "vsls": "^1.0.4753", - "winreg": "^1.2.4" + "configurationDefaults": { + "[r]": { + "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",<>/" + } }, - "extensionDependencies": [ - "REditorSupport.r-syntax" + "taskDefinitions": [ + { + "type": "R", + "required": [ + "code" + ], + "properties": { + "code": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "x <- 'Hello, World!'", + "print(x)" + ], + "description": "R code to be executed" + }, + "options": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "--no-echo", + "--no-restore" + ], + "description": "Command line options used to invoke R. (see R --help)" + }, + "cwd": { + "type": "string", + "default": "${workspaceRoot}", + "description": "The current working directory of the executed program or shell. If omitted, the current workspace root will be used." + }, + "env": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "default": {}, + "description": "The environment of the executed program or shell. If omitted, the current process environment will be used." + } + } + } + ], + "problemMatchers": [ + { + "name": "testthat", + "owner": "R", + "severity": "error", + "fileLocation": [ + "relative", + "${workspaceFolder}/tests/testthat" + ], + "pattern": [ + { + "regexp": "^[-─ ]*(Failure|Error)\\s\\((.*\\.[Rr]):(\\d+):?(\\d+)?\\):\\s(.*)", + "file": 2, + "line": 3, + "column": 4, + "message": 5 + }, + { + "regexp": "^(.*)$", + "message": 1 + } + ] + } ] -} \ No newline at end of file + }, + "scripts": { + "vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production", + "changelog": "npx git-cliff v2.8.5.. -o", + "build": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none", + "watch": "webpack --mode none --watch", + "watchHelp": "tsc -p ./html/help --watch", + "watchHttpgd": "tsc -p ./html/httpgd --watch", + "pretest": "tsc -p ./", + "test": "node ./out/test/runTest.js", + "lint": "eslint src --ext ts" + }, + "devDependencies": { + "@types/cheerio": "^0.22.29", + "@types/ejs": "^3.0.6", + "@types/express": "^4.17.12", + "@types/fs-extra": "^9.0.11", + "@types/glob": "^8.0.0", + "@types/highlight.js": "^10.1.0", + "@types/js-yaml": "^4.0.2", + "@types/mocha": "^8.2.2", + "@types/node": "^18.17.1", + "@types/node-fetch": "^2.5.10", + "@types/sinon": "^10.0.13", + "@types/vscode": "^1.75.0", + "@types/winreg": "^1.2.31", + "@typescript-eslint/eslint-plugin": "^5.30.0", + "@typescript-eslint/parser": "^5.30.0", + "@vscode/test-electron": "^2.2.3", + "copy-webpack-plugin": "^9.0.0", + "eslint": "^7.28.0", + "eslint-plugin-jsdoc": "^35.1.3", + "git-cliff": "^2.8.0", + "mocha": "^11.1.0", + "sinon": "^15.0.1", + "ts-loader": "^9.3.1", + "typescript": "^4.7.2", + "webpack": "^5.99.6", + "webpack-cli": "^4.10.0" + }, + "dependencies": { + "ag-grid-community": "^31.3.2", + "cheerio": "1.0.0-rc.12", + "crypto": "^1.0.1", + "ejs": "^3.1.10", + "fs-extra": "^10.0.0", + "highlight.js": "^11.9.0", + "httpgd": "0.1.6", + "jquery": "^3.7.1", + "jquery.json-viewer": "^1.5.0", + "js-yaml": "^4.1.0", + "node-fetch": "^2.6.7", + "vscode-languageclient": "^9.0.1", + "vsls": "^1.0.4753", + "winreg": "^1.2.4" + }, + "extensionDependencies": [ + "REditorSupport.r-syntax" + ] +} +