Using custom style guides with the new reformat on save functionality

The new reformat documents on save functionality in RStudio lets you use styler to reformat the code.

Is there any way to use custom style guides other than the standard styler::tidyverse_style() with this functionality, like you can with the styler addin and functions?

1 Like

Yes, you can use a custom style guide by setting options(styler.addins_style = your_custom_style), where your_custom_style is a function defining your preferred formatting. This should apply when using "Reformat on Save" in RStudio.