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

Support for .Rnw files #431

Closed
Hasnep opened this Issue Oct 11, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@Hasnep

Hasnep commented Oct 11, 2018

Sorry if this is a dumb thing to ask, but are there any plans to add support for .Rnw files?

If not, how difficult would it be for me to add this as someone who is unfamiliar with developing R libraries?

@lorenzwalthert

This comment has been minimized.

Collaborator

lorenzwalthert commented Oct 11, 2018

Sorry if this is a dumb thing to ask, but are there any plans to add support for .Rnw files?

It's not 😄. I indeed thought about it some time ago, but since I am not using .Rnw myself, I decided not to look into it. To be honest I am not sure how easy that is for you. @jonmcalder and I implemented the .Rmd feature in #233. I think it should not be too hard to adapt the package to handle .Rnw too since from what I can tell, it looks as if we mainly have to change the regex that is dedicated to match {r now. But if you are not familiar with R package development workflows, even a small change in the source code can be tricky. @jonmcalder would you be interested in extending styler in that direction?

@jonmcalder

This comment has been minimized.

Contributor

jonmcalder commented Oct 12, 2018

Sure - this seems feasible and I'd be happy to assist with this. @Hasnep if you'd like to work on this together let me know and we can chat further?

@lorenzwalthert

This comment has been minimized.

Collaborator

lorenzwalthert commented Oct 12, 2018

Cool Jon. Thanks for taking care of this. Looking forward to review a PR 😊

@Hasnep

This comment has been minimized.

Hasnep commented Oct 13, 2018

Thank you both for your quick responses. I don't think my R skills are at the level where I can usefully contribute yet.

@lorenzwalthert

This comment has been minimized.

Collaborator

lorenzwalthert commented Oct 23, 2018

@Hasnep interested in testing this feature? Advised: save + commit / backup a copy of the files you apply styler first.

remotes::install_github("r-lib/styler#434")

Then you can proceed as usual after restarting R (Cmd + Shift + F10 in RStudio).

@lorenzwalthert

This comment has been minimized.

Collaborator

lorenzwalthert commented Nov 3, 2018

Closed with #434.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment