ide-rust

Rust language support for Atom-IDE

rust-lang

172,126

38

1.1.2

MIT

GitHub

This package consumes the following services:

IDE-Rust

Rust language support for Atom-IDE, powered by rust-analyzer.

Features

Install

Install from Settings view by searching for ide-rust, or with the command line:

$ apm install ide-rust

Prerequisites

rust-analyzer must be installed manually, if possible on the PATH (otherwise configure this in the package settings). See https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary.

NOTE: On Windows, you can install it using choco: choco install rust-analyzer

No other packages or manual setup is required as these will be handled with user prompts after install. However, you may wish to install rustup with your OS package manager instead of following prompts to install via rustup.rs.

Configure rust-analyzer

rust-analyzer settings can be stored in a JSON file in the project directory.

It first looks for rust-analyzer.json. If the file does not exists, it then checks .config/rust-analyzer.json.

Refer to the rust-analyzer User Manual for the supported config options.

Examples

enable proc-macro support (from the User Manual)

{
    "cargo": {
        "loadOutDirsFromCheck": true,
    },
    "procMacro": {
        "enable": true,
    }
}

configure rust-fmt

{
    "rustfmt": {
        "extraArgs": ["+nightly"]
    }
}

Commands

Debugging IDE-Rust

If stuff isn't working you can try enabling logging to debug:

This will spit out language server message logging into the atom console. Check if requests/responses are being sent or are incorrect.

RLS

RLS is no longer supported. To use RLS install a previous version of ide-rust, apm install ide-rust@0.21.2.

Screenshots

Autocomplete:

Autocomplete image

Datatips:

Datatips image

Linter:

Linter image

Outline:

Outline image

License

MIT License. See the license for more details.