From 5db6119b9ffc3d90b9132b07bc5c9d3f642cd2ae Mon Sep 17 00:00:00 2001 From: avouacr Date: Thu, 1 Oct 2026 09:44:20 +0000 Subject: [PATCH] feat(vscode-r-python-julia): install arf as R console to replace radian --- vscode/scripts/install-vscode-extensions.sh | 15 +++++++++++++-- vscode/settings/Remote.json | 5 ++++- vscode/settings/User.json | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/vscode/scripts/install-vscode-extensions.sh b/vscode/scripts/install-vscode-extensions.sh index 856be55f..1818b802 100755 --- a/vscode/scripts/install-vscode-extensions.sh +++ b/vscode/scripts/install-vscode-extensions.sh @@ -38,7 +38,9 @@ for extension in "${base_extensions[@]}"; do install_extension $extension done + # Python-specific configuration + python_extensions=( "ms-python.python" "ms-python.flake8" @@ -57,12 +59,18 @@ if command -v python &> /dev/null; then jq --arg pythonPath "$python_path" '.["python.defaultInterpreterPath"] = $pythonPath' ${REMOTE_CONFIG_DIR}/settings.json > tmp.json && mv tmp.json ${REMOTE_CONFIG_DIR}/settings.json fi + # R-specific configuration + +# Install arf as R console +curl --proto '=https' --tlsv1.2 -LsSf https://github.com/eitsupi/arf/releases/latest/download/arf-console-installer.sh | sh + r_extensions=( - "reditorsupport.r" + "REditorSupport.r" "RDebugger.r-debugger" "Posit.air-vscode" ) + if command -v R &> /dev/null; then # Install R kernel for jupyter notebooks if command -v pip &>/dev/null; then @@ -77,15 +85,18 @@ if command -v R &> /dev/null; then for extension in "${r_extensions[@]}"; do install_extension $extension done - R -e "install.packages(c('remotes', 'languageserver', 'rmarkdown', 'httpgd'))" + R -e "install.packages(c('remotes', 'languageserver', 'rmarkdown', 'jgd'))" + R -e "install.packages('sess', repos = c('https://reditorsupport.r-universe.dev', getOption('repos')))" R -e "install.packages('vscDebugger', repos = c('https://manuelhentschel.r-universe.dev', getOption('repos')))" fi + # Julia-specific configuration if command -v julia &> /dev/null; then install_extension "julialang.language-julia" fi + # Quarto-specific configuration if command -v quarto &> /dev/null; then install_extension "quarto.quarto" diff --git a/vscode/settings/Remote.json b/vscode/settings/Remote.json index 683d6c4b..ae42de9b 100644 --- a/vscode/settings/Remote.json +++ b/vscode/settings/Remote.json @@ -2,5 +2,8 @@ "jupyter.kernels.excludePythonEnvironments": [ "/usr/bin/python3", "/bin/python3" - ] + ], + "r.consolePath": "${userHome}/.cargo/bin/arf", + "r.bracketedPaste": true, + "r.plot.backend": "jgd" } diff --git a/vscode/settings/User.json b/vscode/settings/User.json index ee0b7235..3e23b87d 100644 --- a/vscode/settings/User.json +++ b/vscode/settings/User.json @@ -2,7 +2,7 @@ "security.workspace.trust.enabled": false, "security.workspace.trust.startupPrompt": "never", "terminal.integrated.inheritEnv": false, - "git.defaultCloneDirectory": "~/work", + "git.defaultCloneDirectory": "${userHome}/work", "python.testing.pytestEnabled": true, "flake8.args": [ "--max-line-length=100"