Raven documentation¶
Raven is a static analyzer and language server for R. Start with Getting started, or pick a topic below.
Prefer search? The same pages are on the documentation site.
Start here¶
- Getting started: Install Raven and catch your first bug in two minutes.
- Coming from RStudio, vscode-R, Positron, or lintr: What stays the same, what changes, and which settings to flip.
- Editor setup: Set up Raven in VS Code, Neovim, Zed, Helix, Emacs, or any LSP client, and check that it works.
- Raven in CI: Run
raven checkon every pull request with GitHub Actions or Bitbucket Pipelines.
Analysis¶
- Diagnostics: What Raven reports, how to silence or tune it, and a reference for every diagnostic code.
- Cross-file analysis: How Raven follows
source()chains and resolves paths across files. - Non-standard evaluation: How Raven handles dplyr-style column names, and what to do when it can't.
- Package development: How Raven analyzes R packages: visibility between R/ and tests/, NAMESPACE, and build commands.
- box and import modules: How Raven models
box::use()andimport::from()imports. - .Rprofile startup files: How Raven accounts for definitions in a project
.Rprofile. - Linting: Opt-in style rules, configured with
raven.toml,.lintr, or VS Code settings. - Indentation: How Raven indents R code as you type, and the styles you can choose.
Navigation and editing¶
- Completion: Completions for symbols, packages, arguments,
$fields, and file paths. - Hover: What hover shows for functions, variables, and package symbols.
- Go to definition: Jump to where a symbol is defined, across files and into packages.
- Find references: Find every use of a symbol across your project.
- Document outline: The outline and breadcrumbs: sections, functions, and classes.
- Syntax highlighting: Semantic highlighting for R, plus JAGS and Stan grammars.
- Snippets: The R code snippets Raven provides.
R session (VS Code)¶
- R console: Run R in VS Code and send code from the editor.
- Console key bindings: What the emacs and vi editing styles mean, and their keys.
- Debugger: Breakpoints, stepping, and variables for R scripts and documents.
- Plot viewer: View, browse, and save plots in a VS Code panel.
- Data viewer: Browse, sort, and filter data frames of any size with
View(). - Help viewer: Read R help for the function actually in scope.
R Markdown and Quarto¶
- Code chunks: Run, navigate, and get code intelligence in R chunks.
- R Markdown preview and export: Preview
.Rmdfiles and export them to HTML, PDF, or Word. - Quarto: Preview and render
.qmddocuments with Quarto.
Reference¶
- Directives:
# raven:comments that declare symbols, relationships, and suppressions. - Configuration: How settings,
raven.toml, and.lintrcombine, and where Raven looks for them. - Settings reference: Every setting, alphabetically, with its default and
raven.tomlkey. - Command line:
raven check,raven lint,raven packages, and the language server command. - Keybindings: Chunk and console shortcuts compared with RStudio, Quarto, and vscode-R.
Understanding Raven¶
- How Raven compares: Raven next to RStudio, Positron, vscode-R, languageserver, lintr, and Jarl.
- Using Raven with other R tools: Run Raven alongside vscode-R or Positron, and choose which tool owns the console.
- Limitations: What Raven doesn't do yet.
- Package database: How Raven knows package exports without R, and how to keep that data current.
- Performance on large projects: Speed up analysis when many files source the same scripts.
Help¶
- Troubleshooting: A step-by-step procedure for when Raven misbehaves, and what to include in a bug report.
- FAQ: Short answers to common questions.
More¶
- Project README: what Raven is, installation, and license.
- Report a problem. See Troubleshooting first for what to include.