r chunk option: tidy = styler option planned? #3118
Replies: 4 comments 1 reply
-
FYI @cderv |
Beta Was this translation helpful? Give feedback.
-
Are you referring to linting red marker in source code inside RStudio IDE ? The feature is a knitr feature and it is already working. ---
title: "test"
format: html
---
```{r}
#| tidy: styler
a <- 1#one variable
abc <- 2#another variable
```
This will have the comments in R code have spaces added by styler. However, our YAML linter is indeed not aware of that. This is why there is a red marker inside the document. Though I can render without error. We'll fix it. |
Beta Was this translation helpful? Give feedback.
-
Styler is now listed in YAML autocompletion for |
Beta Was this translation helpful? Give feedback.
-
Great, thank you very much for your work! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
You "may use the styler package (Müller and Walthert 2022) to reformat your R code if you set the chunk option tidy = 'styler'" (https://bookdown.org/yihui/rmarkdown-cookbook/opts-tidy.html).
So far in Quarto, I can only set the chunk option
tidy
to true or false. Is this planned?Beta Was this translation helpful? Give feedback.
All reactions