tergotergo is a lightning-fast R code formatter powered by
Rust, designed for developers who prioritize speed and efficiency.
Whether you’re optimizing CI pipelines or building responsive developer
tools, tergo reformats R code in milliseconds.
No Rust tooling required. Binaries are pre-built:
Requires Rust toolchain:
Style your entire R package:
Style specific files/directories:
Customize formatting via tergo.toml in your package root
or through function arguments.
tergo.tomlOverride settings programmatically:
| Option | Type | Default | Description | 
|---|---|---|---|
| indent | integer | 2 | Spaces per indent level | 
| line_length | integer | 120 | Maximum line length before wrapping | 
| embracing_op_no_nl | boolean | TRUE | Remove line breaks in {{ }}(ref) | 
| allow_nl_after_assignment | boolean | FALSE | Permit line breaks after =,<-,:= | 
| space_before_complex_rhs_in_formula | boolean | TRUE | Add space before complex RHS in formulas (ref) | 
| strip_suffix_whitespace_in_function_defs | boolean | TRUE | Trim trailing whitespace in functions | 
| function_line_breaks | string | “hanging” | "single"/"double"/"hanging"function argument formatting (ref) | 
| insert_newline_in_quote_call | boolean | TRUE | Add newlines in long quote()calls | 
| exclusion_list | array of strings | [] | Files/directories to exclude from formatting | 
tergo?Verify performance claims using included benchmarks:
Maintain different .toml files for multiple
projects:
Next Steps:
• Run ?tergo::style for detailed function
documentation
• Visit GitHub repository
for issue tracking
• Experiment with different .toml configurations to match
your team’s style guide ```