Rust language support for Pulsar Edit, powered by rust-analyzer.
- Auto-completion
- Diagnostics (errors and warnings from
rustc
) - Document outline
- Go to definition (
ctrl
orcmd
click) - Type information and Documentation on hover (hold
ctrl
orcmd
for more information) - Find references (
ctrl-alt-shift-f
orcmd-opt-shift-f
also in context menu) - Format file with rustfmt (
ctrl-shift-c
orcmd-shift-c
also in context menu) - Format on save (disabled by default, see
atom-ide-ui
settings) - Rustup toolchain update checking at startup & every 6 hours thereafter
- Supports rustup override toolchains
- Rust language snippets
Install from Settings view by searching for ide-rust
, or with the command line:
$ ppm install ide-rust
Development
After cloning install the package: pulsar -p install
Link to development mode: pulsar -p link -d
Open Pulsar in Dev Mode
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.
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.
enable proc-macro support (from the User Manual)
{
"cargo": {
"loadOutDirsFromCheck": true,
},
"procMacro": {
"enable": true,
}
}
{
"rustfmt": {
"extraArgs": ["+nightly"]
}
}
ide-rust:restart-all-language-servers
Restart all currently active Rls processes
Autocomplete:
Datatips:
Linter:
Outline:
MIT License. See the license for more details.