Rust Analyzer LSP

Rust language server (rust-analyzer) providing code intelligence and analysis for .rs files. Use when working with Rust code that needs autocomplete, go-to-definition, find references, error detection, or refactoring support.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 961 · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name and description (rust-analyzer LSP) match the instructions: installing rust-analyzer, using cargo commands, and configuring .rust-analyzer.json are all expected for a Rust language-server integration.
Instruction Scope
SKILL.md limits actions to installing rust-analyzer (via rustup/brew/apt/pacman or GitHub releases), running standard cargo commands (fmt, clippy, build, test, check), and creating a project-local config file. There are no instructions to read unrelated system files, exfiltrate data, or contact third-party endpoints outside the official rust-analyzer/GitHub docs referenced.
Install Mechanism
This is instruction-only (no install spec). Suggested install methods are standard package managers or the official GitHub releases page. Those are appropriate for this tool; the user should prefer rustup or the distro/package manager and ensure downloads come from the official repo.
Credentials
No environment variables, credentials, or config paths are requested. Creating a .rust-analyzer.json in the project root is reasonable for configuring the language server and does not require extra privileges.
Persistence & Privilege
Skill is not always-enabled and does not request elevated persistence or modify other skills or system-wide agent settings. Autonomous invocation is allowed by default but does not create extra privileges beyond a normal skill.
Assessment
This skill is a normal, coherent developer integration for rust-analyzer. Before installing: prefer rustup or your platform package manager, avoid downloading binaries from unknown mirrors (use the official GitHub releases), and be cautious when running commands requiring sudo. Verify that your editor supports LSP and that you only add .rust-analyzer.json in projects you control.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97cey6t26j403wtwwjjq8qwz180vjcz

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

rust-analyzer LSP

Rust language server integration providing comprehensive code intelligence through rust-analyzer.

Capabilities

  • Code intelligence: Autocomplete, go-to-definition, find references
  • Error detection: Real-time diagnostics for compilation errors
  • Refactoring: Rename symbols, extract function/variable
  • Analysis: Macro expansion, type hints, inlay hints
  • Supported extensions: .rs

Installation

Via rustup (recommended)

rustup component add rust-analyzer

Via Homebrew (macOS)

brew install rust-analyzer

Via package manager (Linux)

# Ubuntu/Debian
sudo apt install rust-analyzer

# Arch Linux
sudo pacman -S rust-analyzer

Manual download

Download pre-built binaries from the releases page.

Verify installation:

rust-analyzer --version

Usage

The language server runs automatically in LSP-compatible editors. For manual operations:

Format code

cargo fmt

Run linter

cargo clippy

Build and test

cargo build
cargo test

Check without building

cargo check

Configuration

Create .rust-analyzer.json in project root:

{
  "checkOnSave": {
    "command": "clippy"
  },
  "inlayHints": {
    "typeHints": true,
    "parameterHints": true
  }
}

Integration Pattern

When editing Rust code:

  1. rust-analyzer provides real-time diagnostics
  2. Run cargo fmt to format code
  3. Use cargo clippy for linting
  4. Run cargo test before committing

Common Cargo Commands

  • cargo new <name> - Create new project
  • cargo build - Compile project
  • cargo run - Build and run
  • cargo test - Run tests
  • cargo check - Fast compile check
  • cargo clippy - Run linter
  • cargo fmt - Format code
  • cargo doc --open - Generate and open docs

More Information

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…