Getting Started
Installation and basic setup for Roughly
This guide will walk you through installing and configuring Roughly for your R projects.
Roughly CLI
Installation
- Download the pre-built binary for your platform from the GitHub Releases page
- Add the binary to your system PATH
Usage
Roughly provides several commands to format code, check for issues, and run a language server:
# Format R filesroughly fmt # Format files in current directoryroughly fmt path/to/files # Format files at the specific path
# Check for issuesroughly check # Lint files in current directory
# Run the language serverroughly server # Start the LSP server
Editor Integrations
VS Code Extension
Roughly is available as a VS Code extension:
- Download the latest
roughly.vsix
from the GitHub Releases page - Install in VS Code:
Terminal window code --install-extension roughly.vsix - Configure in VS Code settings:
{"roughly.path": "/path/to/roughly"}
RStudio (formatter only)
You can configure Roughly as an external formatter in RStudio:
-
Open RStudio and navigate to:
Options > Code > Formatting > Format with an External ToolSet the reformat command to:
path/to/roughly fmt
-
To enable format-on-save, go to:
Options > Code > Saving > Format with an External ToolCheck the
Reformat documents on save
option
Project Configuration
Create a roughly.toml
file in your project root to customize Roughly’s behavior:
case = "snake_case" # or "camelCase"spaces = 2
For detailed configuration options, see the Configuration documentation.