Skip to content

Commit 3e1d977

Browse files
Merge #3054
3054: Move emacs support to emacs-lsp r=flodiebold a=flodiebold emacs-lsp has integrated most of the support code (emacs-lsp/lsp-mode#1395 will remove the last differences, as far as I can tell), so remove rust-analyzer.el here and update the documentation. Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2 parents 5397f05 + 134cc70 commit 3e1d977

File tree

3 files changed

+12
-313
lines changed

3 files changed

+12
-313
lines changed

docs/dev/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0
4343

4444
We use GitHub Actions for CI. Most of the things, including formatting, are checked by
4545
`cargo test` so, if `cargo test` passes locally, that's a good sign that CI will
46-
be green as well. The only exception is that long-running by default a skipped locally.
46+
be green as well. The only exception is that some long-running tests are skipped locally by default.
4747
Use `env RUN_SLOW_TESTS=1 cargo test` to run the full suite.
4848

4949
We use bors-ng to enforce the [not rocket science](https://graydon2.dreamwidth.org/1597.html) rule.
@@ -54,9 +54,9 @@ You can run `cargo xtask install-pre-commit-hook` to install git-hook to run rus
5454

5555
All Rust code lives in the `crates` top-level directory, and is organized as a
5656
single Cargo workspace. The `editors` top-level directory contains code for
57-
integrating with editors. Currently, it contains plugins for VS Code (in
58-
typescript) and Emacs (in elisp). The `docs` top-level directory contains both
59-
developer and user documentation.
57+
integrating with editors. Currently, it contains the plugin for VS Code (in
58+
typescript). The `docs` top-level directory contains both developer and user
59+
documentation.
6060

6161
We have some automation infra in Rust in the `xtask` package. It contains
6262
stuff like formatting checking, code generation and powers `cargo xtask install`.
@@ -107,8 +107,8 @@ If I need to fix something simultaneously in the server and in the client, I
107107
feel even more sad. I don't have a specific workflow for this case.
108108

109109
Additionally, I use `cargo run --release -p ra_cli -- analysis-stats
110-
path/to/some/rust/crate` to run a batch analysis. This is primaraly useful for
111-
performance optimiations, or for bug minimization.
110+
path/to/some/rust/crate` to run a batch analysis. This is primarily useful for
111+
performance optimizations, or for bug minimization.
112112

113113
# Logging
114114

docs/user/README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ install lsp server, clone the repository and then run `cargo xtask install
55
./crates/ra_lsp_server`). This will produce a binary named `ra_lsp_server` which
66
you should be able to use it with any LSP-compatible editor. We use custom
77
extensions to LSP, so special client-side support is required to take full
8-
advantage of rust-analyzer. This repository contains support code for VS Code
9-
and Emacs.
8+
advantage of rust-analyzer. This repository contains support code for VS Code.
109

1110
```
1211
$ git clone git@github.com:rust-analyzer/rust-analyzer && cd rust-analyzer
@@ -130,17 +129,12 @@ host.
130129

131130
## Emacs
132131

133-
Prerequisites:
134-
135-
`emacs-lsp`, `dash` and `ht` packages.
136-
137-
Installation:
132+
* install recent version of `emacs-lsp` package by following the instructions [here][emacs-lsp]
133+
* set `lsp-rust-server` to `'rust-analyzer`
134+
* run `lsp` in a Rust buffer
135+
* (Optionally) bind commands like `lsp-rust-analyzer-join-lines`, `lsp-extend-selection` and `lsp-rust-analyzer-expand-macro` to keys
138136

139-
* add
140-
[rust-analyzer.el](../../editors/emacs/rust-analyzer.el)
141-
to load path and require it in `init.el`
142-
* run `lsp` in a rust buffer
143-
* (Optionally) bind commands like `rust-analyzer-join-lines`, `rust-analyzer-extend-selection` and `rust-analyzer-expand-macro` to keys, and enable `rust-analyzer-inlay-hints-mode` to get inline type hints
137+
[emacs-lsp]: https://github.com/emacs-lsp/lsp-mode
144138

145139

146140
## Vim and NeoVim (coc-rust-analyzer)

editors/emacs/rust-analyzer.el

Lines changed: 0 additions & 295 deletions
This file was deleted.

0 commit comments

Comments
 (0)