You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During TOML discovery, we could also consider looking for .Rproj files "for historical reasons".
We'd treat .Rproj as nearly at the same level as air.toml in terms of importance, like:
air.toml > .Rproj > editor settings > air defaults
If we don't detect an air.toml, but do detect an .Rproj, then we would not consider any other settings, even if we were in VS Code / Positron. It would be like having an air.toml which overrides everything else to help enforce project level settings that everyone is forced to use.
An .Rproj looks like this, with UseSpacesForTab and NumSpacesForTab being the most important that we'd be looking for. We'd translate those into an in memory virtual air.toml and use that virtual toml file.
This would be nice for people that only work in RStudio because the workflow would be like:
Update RStudio UI, which changes the on disk .Rproj
Just rerun air format at the CLI over all files in the directory or save a file where Format on Save is active
Since air is treated as a CLI tool in RStudio, there is no syncing that needs to occur, it would just rediscover that updated .Rproj before the next format request.
The upside is that it means the settings RStudio uses for automatic indentation are in sync with what air tries to format your code to without extra effort.
The downside is that it would be one more level of potential confusion. And if you transition to Positron from RStudio you might be confused about why (kind of hidden) RStudio settings are being preferred over your editor settings.
An alternative is to have an easy way to create an air.toml from an .Rproj, but this won't have the nice property of staying in sync with the RStudio UI.
The text was updated successfully, but these errors were encountered:
With @lionel-:
During TOML discovery, we could also consider looking for
.Rproj
files "for historical reasons".We'd treat
.Rproj
as nearly at the same level asair.toml
in terms of importance, like:air.toml > .Rproj > editor settings > air defaults
If we don't detect an
air.toml
, but do detect an.Rproj
, then we would not consider any other settings, even if we were in VS Code / Positron. It would be like having an air.toml which overrides everything else to help enforce project level settings that everyone is forced to use.An
.Rproj
looks like this, withUseSpacesForTab
andNumSpacesForTab
being the most important that we'd be looking for. We'd translate those into an in memory virtualair.toml
and use that virtual toml file.This would be nice for people that only work in RStudio because the workflow would be like:
.Rproj
air format
at the CLI over all files in the directory or save a file whereFormat on Save
is activeSince air is treated as a CLI tool in RStudio, there is no syncing that needs to occur, it would just rediscover that updated
.Rproj
before the next format request.The upside is that it means the settings RStudio uses for automatic indentation are in sync with what air tries to format your code to without extra effort.
The downside is that it would be one more level of potential confusion. And if you transition to Positron from RStudio you might be confused about why (kind of hidden) RStudio settings are being preferred over your editor settings.
An alternative is to have an easy way to create an
air.toml
from an.Rproj
, but this won't have the nice property of staying in sync with the RStudio UI.The text was updated successfully, but these errors were encountered: