mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Docs cleanups
This commit is contained in:
parent
c27ec69087
commit
134cc70097
2 changed files with 12 additions and 18 deletions
|
@ -43,7 +43,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0
|
||||||
|
|
||||||
We use GitHub Actions for CI. Most of the things, including formatting, are checked by
|
We use GitHub Actions for CI. Most of the things, including formatting, are checked by
|
||||||
`cargo test` so, if `cargo test` passes locally, that's a good sign that CI will
|
`cargo test` so, if `cargo test` passes locally, that's a good sign that CI will
|
||||||
be green as well. The only exception is that long-running by default a skipped locally.
|
be green as well. The only exception is that some long-running tests are skipped locally by default.
|
||||||
Use `env RUN_SLOW_TESTS=1 cargo test` to run the full suite.
|
Use `env RUN_SLOW_TESTS=1 cargo test` to run the full suite.
|
||||||
|
|
||||||
We use bors-ng to enforce the [not rocket science](https://graydon2.dreamwidth.org/1597.html) rule.
|
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
|
||||||
|
|
||||||
All Rust code lives in the `crates` top-level directory, and is organized as a
|
All Rust code lives in the `crates` top-level directory, and is organized as a
|
||||||
single Cargo workspace. The `editors` top-level directory contains code for
|
single Cargo workspace. The `editors` top-level directory contains code for
|
||||||
integrating with editors. Currently, it contains plugins for VS Code (in
|
integrating with editors. Currently, it contains the plugin for VS Code (in
|
||||||
typescript) and Emacs (in elisp). The `docs` top-level directory contains both
|
typescript). The `docs` top-level directory contains both developer and user
|
||||||
developer and user documentation.
|
documentation.
|
||||||
|
|
||||||
We have some automation infra in Rust in the `xtask` package. It contains
|
We have some automation infra in Rust in the `xtask` package. It contains
|
||||||
stuff like formatting checking, code generation and powers `cargo xtask install`.
|
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
|
||||||
feel even more sad. I don't have a specific workflow for this case.
|
feel even more sad. I don't have a specific workflow for this case.
|
||||||
|
|
||||||
Additionally, I use `cargo run --release -p ra_cli -- analysis-stats
|
Additionally, I use `cargo run --release -p ra_cli -- analysis-stats
|
||||||
path/to/some/rust/crate` to run a batch analysis. This is primaraly useful for
|
path/to/some/rust/crate` to run a batch analysis. This is primarily useful for
|
||||||
performance optimiations, or for bug minimization.
|
performance optimizations, or for bug minimization.
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,7 @@ install lsp server, clone the repository and then run `cargo xtask install
|
||||||
./crates/ra_lsp_server`). This will produce a binary named `ra_lsp_server` which
|
./crates/ra_lsp_server`). This will produce a binary named `ra_lsp_server` which
|
||||||
you should be able to use it with any LSP-compatible editor. We use custom
|
you should be able to use it with any LSP-compatible editor. We use custom
|
||||||
extensions to LSP, so special client-side support is required to take full
|
extensions to LSP, so special client-side support is required to take full
|
||||||
advantage of rust-analyzer. This repository contains support code for VS Code
|
advantage of rust-analyzer. This repository contains support code for VS Code.
|
||||||
and Emacs.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone git@github.com:rust-analyzer/rust-analyzer && cd rust-analyzer
|
$ git clone git@github.com:rust-analyzer/rust-analyzer && cd rust-analyzer
|
||||||
|
@ -130,17 +129,12 @@ host.
|
||||||
|
|
||||||
## Emacs
|
## Emacs
|
||||||
|
|
||||||
Prerequisites:
|
* install recent version of `emacs-lsp` package by following the instructions [here][emacs-lsp]
|
||||||
|
* set `lsp-rust-server` to `'rust-analyzer`
|
||||||
|
* run `lsp` in a Rust buffer
|
||||||
|
* (Optionally) bind commands like `lsp-rust-analyzer-join-lines`, `lsp-extend-selection` and `lsp-rust-analyzer-expand-macro` to keys
|
||||||
|
|
||||||
`emacs-lsp`, `dash` and `ht` packages.
|
[emacs-lsp]: https://github.com/emacs-lsp/lsp-mode
|
||||||
|
|
||||||
Installation:
|
|
||||||
|
|
||||||
* add
|
|
||||||
[rust-analyzer.el](../../editors/emacs/rust-analyzer.el)
|
|
||||||
to load path and require it in `init.el`
|
|
||||||
* run `lsp` in a rust buffer
|
|
||||||
* (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
|
|
||||||
|
|
||||||
|
|
||||||
## Vim and NeoVim (coc-rust-analyzer)
|
## Vim and NeoVim (coc-rust-analyzer)
|
||||||
|
|
Loading…
Reference in a new issue