Search

PythonReactSEOPDF
OpenClaw

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.

bowen313370 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install bowen31337/rust-analyzer-lsp

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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

Source information

Source
github
Repository
openclaw/skills
Path
skills/bowen31337/rust-analyzer-lsp
Version
—
Commit
eda5f323e2e55338df27929ab05660bf2b862ba9
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

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)
```bash
rustup component add rust-analyzer
```

### Via Homebrew (macOS)
```bash
brew install rust-analyzer
```

### Via package manager (Linux)
```bash
# Ubuntu/Debian
sudo apt install rust-analyzer

# Arch Linux
sudo pacman -S rust-analyzer
```

### Manual download
Download pre-built binaries from the [releases page](https://github.com/rust-lang/rust-analyzer/releases).

Verify installation:
```bash
rust-analyzer --version
```

## Usage

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

### Format code
```bash
cargo fmt
```

### Run linter
```bash
cargo clippy
```

### Build and test
```bash
cargo build
cargo test
```

### Check without building
```bash
cargo check
```

## Configuration

Create `.rust-analyzer.json` in project root:

```json
{
  "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

- [rust-analyzer Website](https://rust-analyzer.github.io/)
- [GitHub Repos...

Related skills

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.

OpenClaw

0x0-messenger

eijiac24

Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.