Repository navigation
Expand file tree
/
Copy paththird-party-integrations.Rmd
More file actions
41 lines (27 loc) · 2.6 KB
/
Copy paththird-party-integrations.Rmd
File metadata and controls
41 lines (27 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: "Third-party integrations"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Third-party integrations}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
styler functionality is available in other tools, most notably
- as a pre-commit hook `style-files` in <https://github.com/lorenzwalthert/precommit> to format before commit (locally) and enforced as a continuous integration step in the cloud through <https://pre-commit.ci>.
- as an [extension](https://p3m.dev/client/#/repos/openvsx/packages/lorenzwalthert.styler/overview) for Code OSS based IDEs like Positron or VSCode.
- through commenting a PR on GitHub with `\style` when the [GitHub Action](https://github.com/features/actions) [*Tidyverse CI*](https://github.com/r-lib/actions/tree/master/examples#tidyverse-ci-workflow) is used. The most convenient way to set this up is via [`usethis::use_tidy_github_actions()`](https://usethis.r-lib.org/reference/tidyverse.html).
- through the [GitHub Action Workflow](https://github.com/r-lib/actions/tree/v2-branch/examples#style-package) that triggers `styler::style_pkg()` on changes in source files. Setting this up is easiest with `usethis::use_github_action("style")`.
- as a formatter for R Markdown without modifying the source. This feature is implemented as a code chunk option in knitr. use `tidy = "styler"` in the header of a code chunks (e.g.```` ```{r name-of-the-chunk, tidy = "styler"} ````), or `knitr::opts_chunk$set(tidy = "styler")` at the top of your RMarkdown script.
- via the [R language server](https://github.com/REditorSupport/languageserver) to format your code in VS Code, atom and others.
- As a fixer to the [ale Plug-in](https://github.com/dense-analysis/ale/pull/2401) for VIM.
- in `reprex::reprex(..., style = TRUE)` to prettify reprex code before printing. To permanently use `style = TRUE` without specifying it every time, you can add the following line to your `.Rprofile` (via `usethis::edit_r_profile()`): `options(reprex.styler = TRUE)`.
- in the *format-all* command for Emacs in [emacs-format-all-the-code](https://github.com/lassik/emacs-format-all-the-code).
- As a [Jupyterlab code formatter](https://jupyterlab-code-formatter.readthedocs.io).
- for pretty-printing [drake](https://github.com/ropensci/drake) workflow data frames with `drake::drake_plan_source()`.
Do you know another way to use styler that is not listed here? Please let us know by [opening an issue](https://github.com/r-lib/styler/issues) and we'll extend the list.