2  Visual Studio Code

  1. Install VS Code
  2. Install the following R packages
if (!loadNamespace("pak")) {
    install.packages("pak")
    message("Installed pak.")
}

message("Start installing all packages.")
pkgs <- c(
    "languageserver",
    "jsonlite",
    "lintr",
    "styler",
    "cyclocomp",
    "usethis"
)
pak::pkg_install(pkgs)
message("Installed all packages.")
  1. Add VS Code to path, MacOS: command + shift + p -> “Shell Command: Install ‘code’ command in PATH”. This way you can use code ${directory} in the terminal to open that directory in VS Code.
  2. Copy/download: setup/Gaiti Lab.code-profile
  3. Import profile: settings (bottom-left; wheel) -> Profile
  4. Configure the profile
    1. [OPTIONAL] Duplicate the Gaiti Lab profile, and rename as you wish, so you can further customize it. Duplicate by clicking the 3 horizontal dots
    2. Change paths accordingly in VS Code’s settings.json (MacOS: command + shift + p -> “Preferences: Open User Settings (JSON)”), see first JSON snippet below.
    3. The extension “TODO tree” uses ripgrep, if you need to install it, follow ripgrep.dev/download
7. [OPTIONAL] By default the GaitiLab profile uses Fira Code as font, which can be downloaded here: [github.com/tonsky/firacode](https://github.com/tonsky/firacode) if you don't want to use this, reset/remove these settings.
{
  "terminal.integrated.fontFamily": "Fira Code",
  "editor.codeLensFontFamily": "Fira Code",
  "editor.fontFamily": "FiraCode-Retina"
}
  1. Configuring linters (see R linters)