Skip to content

Roughly

Roughly is an R language server, linter, and code formatter, written in Rust.

Linting

Use roughly check to identify potential issues in your code.

Terminal window
roughly check
error: Syntax Error: unexpected "{"
--> R/main.R:0:23
0 | x_option <- function(x {
^
Syntax Error: unexpected "{"

Formatting

Run roughly fmt to format your R code with consistent styling.

Terminal window
roughly fmt --diff
Diff in R/main.R:
x_option<-function( x ) {
x_option <- function(x) {
if (x == "a") {
"option 1"
}else if (x=="b"){
} else if (x == "b") {
"option 2"
} else {
stop('Invalid `x` value')
stop("Invalid `x` value")
}
}
1 file would be reformatted, 3 files already formatted

Language Server

Experience rich IDE features like completions, go-to-definition, and more.