-
-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding styler support #1581
Adding styler support #1581
Conversation
How about supporting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krlmlr Yes, I like the idea of using one option tidy = 'formatR'
or 'styler'
. To make it backward-compatible, tidy = TRUE
means tidy = 'formatR'
. We could even make this option accept a function, so that it is completely extensible.
@lorenzwalthert I'll just tweak the PR by myself and merge it. Thanks!
Cool, thanks @yihui. |
Finally, I got time to try to add styler support as suggested in #1516. I have the following questions:
tidy
(defaults toFALSE
) andtidy.method
(defaults to"formatR"
). We could remove thetidy
option. This would result in a backward-incompatible API change, which is probably not a good idea. I think it would make sense to simply issue a warning when someone setstidy.method = "styler"
and (either because of explicit specification or because of the default)tidy = FALSE
, because he or she probably just wantstidy = TRUE
andtidy.method = styler
. I have not yet implemented that, so let me know if I should go ahead with that.tidy
option was documented.Could you please advise on these points? Thanks.
cc: @krlmlr