You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
* Handle r.a progress messages
* npm update
* Fix completion in atom-languageclient fork
* Update dependencies
* Update to use rust-analyzer by default
* Remove RLS stuff
* Update readmes
* Keep some dead code that may be re-used when r.a is on the release trains
Rust language support for Atom-IDE, powered by [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer).
5
3
6
4
## Features
7
5
- Auto-completion
8
-
- Diagnostics (errors and warnings from `rustc` and `clippy`, see `clippy_preference` setting)
6
+
- Diagnostics (errors and warnings from `rustc`)
9
7
- Document outline
10
8
- Go to definition (`ctrl` or `cmd` click)
11
9
- Type information and Documentation on hover (hold `ctrl` or `cmd` for more information)
12
10
- Find references (`ctrl-alt-shift-f` or `cmd-opt-shift-f` also in context menu)
13
11
- Format file with rustfmt (`ctrl-shift-c` or `cmd-shift-c` also in context menu)
14
12
- Format on save (disabled by default, see `atom-ide-ui` settings)
15
-
- Supports rustup default & override toolchains, or manually select rls toolchain in package settings
16
-
- Rls toolchain update checking at startup & every 6 hours thereafter
17
-
- Global Rls configuration for `all_targets`, `clippy_preference`
18
-
- Per-project Rls configuration using `rls.toml` file at project root, see [rls#configuration](https://github.com/rust-lang-nursery/rls#configuration)
19
-
```toml
20
-
# rls.toml
21
-
features = ["serde"]
22
-
```
23
-
- Graceful handling of Rls being missing from the distribution _(which is/was somewhat common on the nightly channel)_
24
-
* Warns before installing a rust version without Rls or when using an already installed one
25
-
* Automatic detection of, and prompt to install, the latest working dated release
13
+
- Rustup toolchain update checking at startup & every 6 hours thereafter
14
+
- Supports rustup override toolchains
26
15
- Rust language snippets
27
16
28
17
## Install
29
-
You can install from the command line with:
18
+
Install from Settings view by searching for `ide-rust`, or with the command line:
30
19
```
31
20
$ apm install ide-rust
32
21
```
33
-
Or you can install from Settings view by searching for `ide-rust`.
34
22
35
-
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](https://rustup.rs).
23
+
### Prerequisites
24
+
**rust-analyzer** must be installed manually, if possible on the PATH _(otherwise configure this in the package settings)_.
25
+
See https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary.
26
+
27
+
No other packages or manual setup is required as these will be handled with user prompts after install.
28
+
However, you may wish to install `rustup` with your OS package manager instead of following prompts to install via [rustup.rs](https://rustup.rs).
36
29
37
30
## Commands
38
31
-`ide-rust:restart-all-language-servers` Restart all currently active Rls processes
39
32
40
-
## Multi-crate projects
41
-
A root `Cargo.toml` is required in each atom project, however cargo workspaces can be used to support multiple crates in a single project.
42
-
For example, a project with *'rust_foo'* & *'rust_bar'* directories/crates could have the following root `Cargo.toml`
43
-
```toml
44
-
# Cargo.toml
45
-
[workspace]
46
-
members = [
47
-
"rust_foo",
48
-
"rust_bar",
49
-
]
50
-
```
51
-
52
-
Even if you only have a single crate in your Atom project, RLS can only detect it if you
53
-
have a root `Cargo.toml`. If your project is setup such that you have one or more crate nested
54
-
in folders under the root, you can add a root `Cargo.toml` file and setup a Cargo workspace that
55
-
includes all the crates in the project:
56
-
```toml
57
-
# Cargo.toml
58
-
[workspace]
59
-
members = [
60
-
"foo/bar/rust_foo",
61
-
]
62
-
```
63
-
64
-
## Overriding Rls
65
-
The Rls command can be specified manually, for example to run from local source code:
66
-
```cson
67
-
# config.cson
68
-
...
69
-
"ide-rust":
70
-
rlsCommandOverride:"cargo +nightly run --manifest-path=/rls-src/Cargo.toml"
71
-
```
72
-
When set you'll be able to see, and remove, this from the package settings. After restarting atom an info message will inform you the override is in place.
If stuff isn't working you can try **enabling logging** to debug:
78
35
* Open the atom console _(ctrl-shift-i)_
@@ -81,5 +38,8 @@ If stuff isn't working you can try **enabling logging** to debug:
81
38
82
39
This will spit out language server message logging into the atom console. Check if requests/responses are being sent or are incorrect. It will also include any Rls stderr messages (as warnings) which may point to Rls bugs.
83
40
41
+
## RLS
42
+
RLS is no longer supported. To use RLS install a previous version of ide-rust, `apm install [email protected]`.
43
+
84
44
## License
85
45
MIT License. See the [license](LICENSE) for more details.
0 commit comments