From e2f4852d4f7454318aafc207271f8318ab36ca64 Mon Sep 17 00:00:00 2001 From: Elizabeth Perl Date: Thu, 14 Nov 2024 21:25:10 +0000 Subject: [PATCH] add rstudio devcontainer for codespaces --- .devcontainer/devcontainer.json | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..11eeea0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,49 @@ +// Codespace +// This codespace contains R and a port for an Rstudio server in case +// that is the preferred IDE over VSCode. +{ + "name": "R (rocker/tidyverse)", + "image": "ghcr.io/rocker-org/devcontainer/tidyverse:4.3", + + "features": { + "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {}, + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "make,gcc,g++,cmake,clang-tidy,clang-format" + }, + "ghcr.io/rocker-org/devcontainer-features/r-packages:1": { + "packages": "cli,rlang,usethis,devtools,ggplot2,remotes,pak", + "installSystemRequirements": true + } + }, + "customizations": { + "vscode": { + "settings": { + "r.rterm.linux": "/usr/local/bin/radian", + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "[r]": { + "editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?" + } + }, + "extensions":[ + "GitHub.codespaces", + "hbenl.vscode-test-explorer", + "reditorsupport.r", + "rdebugger.r-debugger", + "ms-vsliveshare.vsliveshare", + "mathematic.vscode-pdf" + ] + } + }, + "forwardPorts": [8787], + "portsAttributes": { + "8787": { + "label": "Rstudio", + "requireLocalPort": true, + "onAutoForward": "ignore" + } + }, + "postAttachCommand": "sudo rstudio-server start", + "remoteUser": "rstudio" + +}