posit-dev / posit-dev/air

Setup for all users of RStudio Server.

Open
#308 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
446
Forks
32
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Hi :)

Within an R-Studio Server Docker container, how can Air be installed and automatically used system-wide for all users? i.e. some global R-Studio config to enable the external formatter command for all sessions.

Basically would like to have all our projects auto-formatted without any user intervention.
Is a global .air.toml possible ?

Cheers !

Edit:

I've half-solved my issue, so if anyone else comes here in the future with the same issue, you can do:

...
RUN curl -LsSf https://github.com/posit-dev/air/releases/latest/download/air-installer.sh | sh
RUN cp /root/.local/bin/air /usr/local/bin/
COPY rstudio-prefs.json /etc/rstudio/rstudio-prefs.json
...

/etc/rstudio/rstudio-prefs.json

{
    "code_formatter": "external",
    "code_formatter_external_command": "/usr/local/bin/air format",
    "reformat_on_save": true
}

Although I am still wondering if a global .air.toml is possible.

Note: It seems that Air will respect some .Rproj configs, e.g. indentation settings, if you don't have an .air.toml present. Sorry, that was not true.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Dockerfile setup, /etc/rstudio/rstudio-prefs.json configuration, and the referenced global .air.toml question. Start by checking how Air discovers configuration and whether system-wide configuration is documented or tested. Done means determining whether a global configuration is supported and documenting or specifying the container-wide setup needed for all RStudio sessions.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, r, rust
Domain
devops, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.