rstudio / rstudioapi

Safely access RStudio's API (when available)
http://rstudio.github.io/rstudioapi
Other
167 stars 36 forks source link

Feature request: include path to `.rstheme` file in `getThemeInfo()` #256

Open rossellhayes opened 2 years ago

rossellhayes commented 2 years ago

Currently, getThemeInfo() gives very little information about the current RStudio theme. This makes it hard to develop packages that attempt to apply formatting that matches the current Rstudio theme.

The most common approach (see e.g. cli, thematic and rsciinema) is to pre-generate data to match the default RStudio themes. But this makes it impossible for packages to match custom themes, including custom themes aimed at improving RStudio's color accessibility.

If rstudioapi included a way to access the path to the active .rstheme file, packages could extract CSS data and provide matching for any theme, default or custom.

I'd be happy to work on a PR if this feature would be helpful!

Related to #174.