diff options
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/features.md | 14 | ||||
-rw-r--r-- | docs/user/readme.adoc | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/docs/user/features.md b/docs/user/features.md index b9a365fc1..340bce835 100644 --- a/docs/user/features.md +++ b/docs/user/features.md | |||
@@ -143,9 +143,9 @@ takes arguments, the cursor is positioned inside the parenthesis. | |||
143 | There are postfix completions, which can be triggered by typing something like | 143 | There are postfix completions, which can be triggered by typing something like |
144 | `foo().if`. The word after `.` determines postfix completion. Possible variants are: | 144 | `foo().if`. The word after `.` determines postfix completion. Possible variants are: |
145 | 145 | ||
146 | - `expr.if` -> `if expr {}` | 146 | - `expr.if` -> `if expr {}` or `if let ... {}` for `Option` or `Result` |
147 | - `expr.match` -> `match expr {}` | 147 | - `expr.match` -> `match expr {}` |
148 | - `expr.while` -> `while expr {}` | 148 | - `expr.while` -> `while expr {}` or `while let ... {}` for `Option` or `Result` |
149 | - `expr.ref` -> `&expr` | 149 | - `expr.ref` -> `&expr` |
150 | - `expr.refm` -> `&mut expr` | 150 | - `expr.refm` -> `&mut expr` |
151 | - `expr.not` -> `!expr` | 151 | - `expr.not` -> `!expr` |
@@ -161,6 +161,16 @@ There also snippet completions: | |||
161 | #### Inside Modules | 161 | #### Inside Modules |
162 | 162 | ||
163 | - `tfn` -> `#[test] fn f(){}` | 163 | - `tfn` -> `#[test] fn f(){}` |
164 | - `tmod` -> | ||
165 | ```rust | ||
166 | #[cfg(test)] | ||
167 | mod tests { | ||
168 | use super::*; | ||
169 | |||
170 | #[test] | ||
171 | fn test_fn() {} | ||
172 | } | ||
173 | ``` | ||
164 | 174 | ||
165 | ### Code Highlighting | 175 | ### Code Highlighting |
166 | 176 | ||
diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index f6ce0accf..d750c7705 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc | |||
@@ -108,7 +108,7 @@ Here are some useful self-diagnostic commands: | |||
108 | 108 | ||
109 | * **Rust Analyzer: Show RA Version** shows the version of `rust-analyzer` binary | 109 | * **Rust Analyzer: Show RA Version** shows the version of `rust-analyzer` binary |
110 | * **Rust Analyzer: Status** prints some statistics about the server, like the few latest LSP requests | 110 | * **Rust Analyzer: Status** prints some statistics about the server, like the few latest LSP requests |
111 | * To enable server-side logging, run with `env RUST_LOG=info` and see `Output > Rust Analyzer Language Server` in VS Code's panel. | 111 | * To enable server-side logging, run with `env RA_LOG=info` and see `Output > Rust Analyzer Language Server` in VS Code's panel. |
112 | * To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Server Trace` in the panel. | 112 | * To log all LSP requests, add `"rust-analyzer.trace.server": "verbose"` to the settings and look for `Server Trace` in the panel. |
113 | * To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open the `Console` tab of VS Code developer tools. | 113 | * To enable client-side logging, add `"rust-analyzer.trace.extension": true` to the settings and open the `Console` tab of VS Code developer tools. |
114 | 114 | ||