diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/architecture.md | 6 | ||||
-rw-r--r-- | docs/dev/lsp-extensions.md | 18 | ||||
-rw-r--r-- | docs/dev/style.md | 4 | ||||
-rw-r--r-- | docs/user/generated_config.adoc | 2 | ||||
-rw-r--r-- | docs/user/manual.adoc | 2 |
5 files changed, 24 insertions, 8 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index e2237ca95..fb991133a 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md | |||
@@ -97,13 +97,13 @@ See [RFC](https://github.com/rust-lang/rfcs/pull/2256) and [./syntax.md](./synta | |||
97 | 97 | ||
98 | - [rowan](https://github.com/rust-analyzer/rowan) library is used for constructing syntax trees. | 98 | - [rowan](https://github.com/rust-analyzer/rowan) library is used for constructing syntax trees. |
99 | - `ast` provides a type safe API on top of the raw `rowan` tree. | 99 | - `ast` provides a type safe API on top of the raw `rowan` tree. |
100 | - `ungrammar` description of the grammar, which is used to generate `syntax_kinds` and `ast` modules, using `cargo xtask codegen` command. | 100 | - `ungrammar` description of the grammar, which is used to generate `syntax_kinds` and `ast` modules, using `cargo test -p xtask` command. |
101 | 101 | ||
102 | Tests for ra_syntax are mostly data-driven. | 102 | Tests for ra_syntax are mostly data-driven. |
103 | `test_data/parser` contains subdirectories with a bunch of `.rs` (test vectors) and `.txt` files with corresponding syntax trees. | 103 | `test_data/parser` contains subdirectories with a bunch of `.rs` (test vectors) and `.txt` files with corresponding syntax trees. |
104 | During testing, we check `.rs` against `.txt`. | 104 | During testing, we check `.rs` against `.txt`. |
105 | If the `.txt` file is missing, it is created (this is how you update tests). | 105 | If the `.txt` file is missing, it is created (this is how you update tests). |
106 | Additionally, running `cargo xtask codegen` will walk the grammar module and collect all `// test test_name` comments into files inside `test_data/parser/inline` directory. | 106 | Additionally, running the xtask test suite with `cargo test -p xtask` will walk the grammar module and collect all `// test test_name` comments into files inside `test_data/parser/inline` directory. |
107 | 107 | ||
108 | To update test data, run with `UPDATE_EXPECT` variable: | 108 | To update test data, run with `UPDATE_EXPECT` variable: |
109 | 109 | ||
@@ -111,7 +111,7 @@ To update test data, run with `UPDATE_EXPECT` variable: | |||
111 | env UPDATE_EXPECT=1 cargo qt | 111 | env UPDATE_EXPECT=1 cargo qt |
112 | ``` | 112 | ``` |
113 | 113 | ||
114 | After adding a new inline test you need to run `cargo xtest codegen` and also update the test data as described above. | 114 | After adding a new inline test you need to run `cargo test -p xtask` and also update the test data as described above. |
115 | 115 | ||
116 | Note [`api_walkthrough`](https://github.com/rust-analyzer/rust-analyzer/blob/2fb6af89eb794f775de60b82afe56b6f986c2a40/crates/ra_syntax/src/lib.rs#L190-L348) | 116 | Note [`api_walkthrough`](https://github.com/rust-analyzer/rust-analyzer/blob/2fb6af89eb794f775de60b82afe56b6f986c2a40/crates/ra_syntax/src/lib.rs#L190-L348) |
117 | in particular: it shows off various methods of working with syntax tree. | 117 | in particular: it shows off various methods of working with syntax tree. |
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index dd3ecc18d..694fafcd5 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -1,5 +1,5 @@ | |||
1 | <!--- | 1 | <!--- |
2 | lsp_ext.rs hash: d279d971d4f62cd7 | 2 | lsp_ext.rs hash: 4dfa8d7035f4aee7 |
3 | 3 | ||
4 | If you need to change the above hash to make the test pass, please check if you | 4 | If you need to change the above hash to make the test pass, please check if you |
5 | need to adjust this doc as well and ping this issue: | 5 | need to adjust this doc as well and ping this issue: |
@@ -579,3 +579,19 @@ This request is sent from client to server to open the current project's Cargo.t | |||
579 | ``` | 579 | ``` |
580 | 580 | ||
581 | `experimental/openCargoToml` returns a single `Link` to the start of the `[package]` keyword. | 581 | `experimental/openCargoToml` returns a single `Link` to the start of the `[package]` keyword. |
582 | |||
583 | ## Related tests | ||
584 | |||
585 | This request is sent from client to server to get the list of tests for the specified position. | ||
586 | |||
587 | **Method:** `rust-analyzer/relatedTests` | ||
588 | |||
589 | **Request:** `TextDocumentPositionParams` | ||
590 | |||
591 | **Response:** `TestInfo[]` | ||
592 | |||
593 | ```typescript | ||
594 | interface TestInfo { | ||
595 | runnable: Runnable; | ||
596 | } | ||
597 | ``` | ||
diff --git a/docs/dev/style.md b/docs/dev/style.md index 46bd8b9b2..c4eb7bc7a 100644 --- a/docs/dev/style.md +++ b/docs/dev/style.md | |||
@@ -91,8 +91,8 @@ But many users read changelogs. | |||
91 | We don't enforce Clippy. | 91 | We don't enforce Clippy. |
92 | A number of default lints have high false positive rate. | 92 | A number of default lints have high false positive rate. |
93 | Selectively patching false-positives with `allow(clippy)` is considered worse than not using Clippy at all. | 93 | Selectively patching false-positives with `allow(clippy)` is considered worse than not using Clippy at all. |
94 | There's `cargo xtask lint` command which runs a subset of low-FPR lints. | 94 | There's a `cargo lint` command which runs a subset of low-FPR lints. |
95 | Careful tweaking of `xtask lint` is welcome. | 95 | Careful tweaking of `lint` is welcome. |
96 | Of course, applying Clippy suggestions is welcome as long as they indeed improve the code. | 96 | Of course, applying Clippy suggestions is welcome as long as they indeed improve the code. |
97 | 97 | ||
98 | **Rationale:** see [rust-lang/clippy#5537](https://github.com/rust-lang/rust-clippy/issues/5537). | 98 | **Rationale:** see [rust-lang/clippy#5537](https://github.com/rust-lang/rust-clippy/issues/5537). |
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 042ba2d54..c2521289c 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc | |||
@@ -276,7 +276,7 @@ Number of syntax trees rust-analyzer keeps in memory. Defaults to 128. | |||
276 | -- | 276 | -- |
277 | Whether to show `can't find Cargo.toml` error message. | 277 | Whether to show `can't find Cargo.toml` error message. |
278 | -- | 278 | -- |
279 | [[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `false`):: | 279 | [[rust-analyzer.procMacro.enable]]rust-analyzer.procMacro.enable (default: `true`):: |
280 | + | 280 | + |
281 | -- | 281 | -- |
282 | Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts#`. | 282 | Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScripts#`. |
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index 4f2217546..f4c37353c 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -19,7 +19,7 @@ The LSP allows various code editors, like VS Code, Emacs or Vim, to implement se | |||
19 | To improve this document, send a pull request: + | 19 | To improve this document, send a pull request: + |
20 | https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc[https://github.com/rust-analyzer/.../manual.adoc] | 20 | https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc[https://github.com/rust-analyzer/.../manual.adoc] |
21 | 21 | ||
22 | The manual is written in https://asciidoc.org[AsciiDoc] and includes some extra files which are generated from the source code. Run `cargo test` and `cargo xtask codegen` to create these and then `asciidoctor manual.adoc` to create an HTML copy. | 22 | The manual is written in https://asciidoc.org[AsciiDoc] and includes some extra files which are generated from the source code. Run `cargo test` and `cargo test -p xtask` to create these and then `asciidoctor manual.adoc` to create an HTML copy. |
23 | 23 | ||
24 | ==== | 24 | ==== |
25 | 25 | ||