Skip to content

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

  1. Download the pre-built binary for your platform from the GitHub Releases page
  2. Add the binary to your system PATH

Usage

Roughly provides several commands to format code, check for issues, and run a language server:

Terminal window
# Format R files
roughly fmt # Format files in current directory
roughly fmt path/to/files # Format files at the specific path
# Check for issues
roughly check # Lint files in current directory
# Run the language server
roughly lsp # Start the LSP server

For the optimal R development experience, install the Roughly VS Code extension.

  1. Download the latest roughly.vsix from the GitHub Releases page
  2. Install in VS Code:
    Terminal window
    code --install-extension roughly.vsix
  3. Configure in VS Code settings:
    {
    "roughly.path": "/path/to/roughly"
    }

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.