R language server for code intelligence - diagnostics, go-to-definition, hover, references, and formatting via languageserver
npx claudepluginhub ab604/claude-code-r-skills --plugin r-lspClaude Code plugin for R language server integration. Provides code intelligence for R files including diagnostics, go-to-definition, hover documentation, find references, and code formatting.
Note: If you're using Positron, you don't need this plugin—Positron has built-in R language server support. This plugin is for VS Code, terminal Claude Code, and other environments without native R LSP integration.
Once installed, Claude gains these capabilities when working with R files:
| Feature | Description |
|---|---|
| Diagnostics | Automatic lintr warnings and errors after each edit |
| Hover | Documentation and type info for functions and variables |
| Go to Definition | Jump to where functions/variables are defined |
| Find References | Locate all usages of a symbol |
| Document Symbols | Outline of functions and objects in a file |
| Formatting | Code formatting via styler |
Install the R languageserver package:
install.packages("languageserver")
For full functionality, also install:
install.packages("lintr") # Diagnostics
install.packages("styler") # Formatting
Verify R is in your PATH:
R --version
/plugin marketplace add ab604/r-lsp
/plugin install r-lsp@ab604-r-lsp
/plugin marketplace add /path/to/r-lsp
/plugin install r-lsp@local-r-lsp
| Extension | Language ID |
|---|---|
.R, .r | r |
.Rmd, .rmd | rmd |
.qmd | quarto |
This plugin configures Claude Code to connect to the R languageserver package. When you open an R project:
languageserver::run()Ensure R is installed and available:
which R
R --version
Install the R package:
install.packages("languageserver")
Install lintr:
install.packages("lintr")
Check if lintr works:
lintr::lint("your_file.R")
The R languageserver can use significant memory on large projects. If needed:
/plugin disable r-lsp@ab604-r-lsp
The language server respects your project's .lintr file for diagnostic rules. Example .lintr:
linters: linters_with_defaults(
line_length_linter(120),
commented_code_linter = NULL
)
MIT
TypeScript/JavaScript language server for enhanced code intelligence
C/C++ language server (clangd) for code intelligence
C# language server for code intelligence
Python language server (Pyright) for type checking and code intelligence
Go language server for code intelligence and refactoring
TypeScript and JavaScript language server integration (using vtsls)