Skip to content

Commit 07d56d8

Browse files
committed
Changelog 57
1 parent 74f8189 commit 07d56d8

File tree

5 files changed

+100
-24
lines changed

5 files changed

+100
-24
lines changed

generated_assists.adoc

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ fn main() {
4343

4444
[discrete]
4545
=== `add_impl_default_members`
46-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_missing_impl_members.rs#L51[add_missing_impl_members.rs]
46+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/add_missing_impl_members.rs#L53[add_missing_impl_members.rs]
4747

4848
Adds scaffold for overriding default impl members.
4949

5050
.Before
5151
```rust
5252
trait Trait {
53-
Type X;
53+
type X;
5454
fn foo(&self);
5555
fn bar(&self) {}
5656
}
5757

5858
impl Trait for () {
59-
Type X = ();
59+
type X = ();
6060
fn foo(&self) {}┃
6161

6262
}
@@ -65,13 +65,13 @@ impl Trait for () {
6565
.After
6666
```rust
6767
trait Trait {
68-
Type X;
68+
type X;
6969
fn foo(&self);
7070
fn bar(&self) {}
7171
}
7272

7373
impl Trait for () {
74-
Type X = ();
74+
type X = ();
7575
fn foo(&self) {}
7676

7777
$0fn bar(&self) {}
@@ -88,7 +88,7 @@ Adds scaffold for required impl members.
8888
.Before
8989
```rust
9090
trait Trait<T> {
91-
Type X;
91+
type X;
9292
fn foo(&self) -> T;
9393
fn bar(&self) {}
9494
}
@@ -101,14 +101,16 @@ impl Trait<u32> for () {┃
101101
.After
102102
```rust
103103
trait Trait<T> {
104-
Type X;
104+
type X;
105105
fn foo(&self) -> T;
106106
fn bar(&self) {}
107107
}
108108

109109
impl Trait<u32> for () {
110+
$0type X;
111+
110112
fn foo(&self) -> u32 {
111-
${0:todo!()}
113+
todo!()
112114
}
113115
}
114116
```
@@ -278,6 +280,25 @@ fn qux(bar: Bar, baz: Baz) {}
278280
```
279281

280282

283+
[discrete]
284+
=== `extract_module_to_file`
285+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/extract_module_to_file.rs#L10[extract_module_to_file.rs]
286+
287+
This assist extract module to file.
288+
289+
.Before
290+
```rust
291+
mod foo {┃
292+
fn t() {}
293+
}
294+
```
295+
296+
.After
297+
```rust
298+
mod foo;
299+
```
300+
301+
281302
[discrete]
282303
=== `extract_struct_from_enum_variant`
283304
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/extract_struct_from_enum_variant.rs#L19[extract_struct_from_enum_variant.rs]
@@ -949,7 +970,7 @@ impl Walrus {
949970

950971
[discrete]
951972
=== `remove_unused_param`
952-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/remove_unused_param.rs#L13[remove_unused_param.rs]
973+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/assists/src/handlers/remove_unused_param.rs#L14[remove_unused_param.rs]
953974

954975
Removes unused function parameter.
955976

generated_config.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rust-analyzer.assist.importPrefix (default: `"plain"`)::
55
rust-analyzer.callInfo.full (default: `true`)::
66
Show function name and docs in parameter hints.
77
rust-analyzer.cargo.autoreload (default: `true`)::
8-
Automatically refresh project info via `cargo metadata` on Cargo.toml changes.
8+
Automatically refresh project info via `cargo metadata` on `Cargo.toml` changes.
99
rust-analyzer.cargo.allFeatures (default: `false`)::
1010
Activate all available features.
1111
rust-analyzer.cargo.features (default: `[]`)::
@@ -21,19 +21,19 @@ rust-analyzer.cargo.noSysroot (default: `false`)::
2121
rust-analyzer.checkOnSave.enable (default: `true`)::
2222
Run specified `cargo check` command for diagnostics on save.
2323
rust-analyzer.checkOnSave.allFeatures (default: `null`)::
24-
Check with all features (will be passed as `--all-features`). Defaults to `rust-analyzer.cargo.allFeatures`.
24+
Check with all features (will be passed as `--all-features`). Defaults to `#rust-analyzer.cargo.allFeatures#`.
2525
rust-analyzer.checkOnSave.allTargets (default: `true`)::
2626
Check all targets and tests (will be passed as `--all-targets`).
2727
rust-analyzer.checkOnSave.command (default: `"check"`)::
2828
Cargo command to use for `cargo check`.
2929
rust-analyzer.checkOnSave.noDefaultFeatures (default: `null`)::
3030
Do not activate the `default` feature.
3131
rust-analyzer.checkOnSave.target (default: `null`)::
32-
Check for a specific target. Defaults to `rust-analyzer.cargo.target`.
32+
Check for a specific target. Defaults to `#rust-analyzer.cargo.target#`.
3333
rust-analyzer.checkOnSave.extraArgs (default: `[]`)::
3434
Extra arguments for `cargo check`.
3535
rust-analyzer.checkOnSave.features (default: `null`)::
36-
List of features to activate. Defaults to `rust-analyzer.cargo.features`.
36+
List of features to activate. Defaults to `#rust-analyzer.cargo.features#`.
3737
rust-analyzer.checkOnSave.overrideCommand (default: `null`)::
3838
Advanced option, fully override the command rust-analyzer uses for checking. The command should include `--message-format=json` or similar option.
3939
rust-analyzer.completion.addCallArgumentSnippets (default: `true`)::
@@ -43,17 +43,17 @@ rust-analyzer.completion.addCallParenthesis (default: `true`)::
4343
rust-analyzer.completion.postfix.enable (default: `true`)::
4444
Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
4545
rust-analyzer.completion.autoimport.enable (default: `true`)::
46-
Toggles the additional completions that automatically add imports when completed. Note that your client have to specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
46+
Toggles the additional completions that automatically add imports when completed. Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
4747
rust-analyzer.diagnostics.enable (default: `true`)::
4848
Whether to show native rust-analyzer diagnostics.
4949
rust-analyzer.diagnostics.enableExperimental (default: `true`)::
5050
Whether to show experimental rust-analyzer diagnostics that might have more false positives than usual.
5151
rust-analyzer.diagnostics.disabled (default: `[]`)::
5252
List of rust-analyzer diagnostics to disable.
5353
rust-analyzer.diagnostics.warningsAsHint (default: `[]`)::
54-
List of warnings that should be displayed with info severity.\nThe warnings will be indicated by a blue squiggly underline in code and a blue icon in the problems panel.
54+
List of warnings that should be displayed with info severity.\n\nThe warnings will be indicated by a blue squiggly underline in code and a blue icon in the `Problems Panel`.
5555
rust-analyzer.diagnostics.warningsAsInfo (default: `[]`)::
56-
List of warnings that should be displayed with hint severity.\nThe warnings will be indicated by faded text or three dots in code and will not show up in the problems panel.
56+
List of warnings that should be displayed with hint severity.\n\nThe warnings will be indicated by faded text or three dots in code and will not show up in the `Problems Panel`.
5757
rust-analyzer.files.watcher (default: `"client"`)::
5858
Controls file watching implementation.
5959
rust-analyzer.hoverActions.debug (default: `true`)::
@@ -71,7 +71,7 @@ rust-analyzer.hoverActions.linksInHover (default: `true`)::
7171
rust-analyzer.inlayHints.chainingHints (default: `true`)::
7272
Whether to show inlay type hints for method chains.
7373
rust-analyzer.inlayHints.maxLength (default: `null`)::
74-
Maximum length for inlay hints.
74+
Maximum length for inlay hints. Default is unlimited.
7575
rust-analyzer.inlayHints.parameterHints (default: `true`)::
7676
Whether to show function parameter name inlay hints at the call site.
7777
rust-analyzer.inlayHints.typeHints (default: `true`)::
@@ -87,20 +87,20 @@ rust-analyzer.lens.run (default: `true`)::
8787
rust-analyzer.lens.methodReferences (default: `false`)::
8888
Whether to show `Method References` lens. Only applies when `#rust-analyzer.lens.enable#` is set.
8989
rust-analyzer.linkedProjects (default: `[]`)::
90-
Disable project auto-discovery in favor of explicitly specified set of projects. \nElements must be paths pointing to Cargo.toml, rust-project.json, or JSON objects in rust-project.json format.
90+
Disable project auto-discovery in favor of explicitly specified set of projects.\n\nElements must be paths pointing to `Cargo.toml`, `rust-project.json`, or JSON objects in `rust-project.json` format.
9191
rust-analyzer.lruCapacity (default: `null`)::
92-
Number of syntax trees rust-analyzer keeps in memory.
92+
Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
9393
rust-analyzer.notifications.cargoTomlNotFound (default: `true`)::
9494
Whether to show `can't find Cargo.toml` error message.
9595
rust-analyzer.procMacro.enable (default: `false`)::
96-
Enable Proc macro support, cargo.loadOutDirsFromCheck must be enabled.
96+
Enable Proc macro support, `#rust-analyzer.cargo.loadOutDirsFromCheck#` must be enabled.
9797
rust-analyzer.runnables.overrideCargo (default: `null`)::
9898
Command to be executed instead of 'cargo' for runnables.
9999
rust-analyzer.runnables.cargoExtraArgs (default: `[]`)::
100-
Additional arguments to be passed to cargo for runnables such as tests or binaries.\nFor example, it may be '--release'.
100+
Additional arguments to be passed to cargo for runnables such as tests or binaries.\nFor example, it may be `--release`.
101101
rust-analyzer.rustcSource (default: `null`)::
102102
Path to the rust compiler sources, for usage in rustc_private projects.
103103
rust-analyzer.rustfmt.extraArgs (default: `[]`)::
104-
Additional arguments to rustfmt.
104+
Additional arguments to `rustfmt`.
105105
rust-analyzer.rustfmt.overrideCommand (default: `null`)::
106106
Advanced option, fully override the command rust-analyzer uses for formatting.

generated_features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The following postfix snippets are available:
116116

117117

118118
=== Fuzzy Completion and Autoimports
119-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/completion/src/completions/unqualified_path.rs#L76[unqualified_path.rs]
119+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/completion/src/completions/unqualified_path.rs#L80[unqualified_path.rs]
120120

121121
When completing names in the current scope, proposes additional imports from other modules or crates,
122122
if they can be qualified in the scope and their name contains all symbols from the completion input

manual.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ The are several LSP client implementations for vim or neovim:
218218
* automatically install and upgrade stable/nightly releases
219219
* same configurations as VSCode extension, `rust-analyzer.serverPath`, `rust-analyzer.cargo.features` etc.
220220
* same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.ssr` etc.
221-
* inlay hints for method chaining support, _Neovim Only_
221+
* inlay hints for variables and method chaining, _Neovim Only_
222222
* semantic highlighting is not implemented yet
223223

224224
==== LanguageClient-neovim
@@ -302,6 +302,9 @@ If the LSP binary is not available, GNOME Builder can install it when opening a
302302
rust-analyzer is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files.
303303
Please consult your editor's documentation to learn how to configure LSP servers.
304304

305+
To verify which configuration is actually used by rust-analyzer, set `RA_LOG` environment variable to `rust_analyzer=info` and look for config-related messages.
306+
Logs should show both the JSON that rust-analyzer sees as well as the updated config.
307+
305308
This is the list of config options rust-analyzer supports:
306309

307310
include::./generated_config.adoc[]
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
= Changelog #57
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:1d530756ed7ba175ec32ff71247072798dc9a748[] +
6+
Release: release:2020-12-28[]
7+
8+
Last release for 2020!
9+
10+
== Sponsors
11+
12+
**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or
13+
https://github.com/sponsors/rust-analyzer[GitHub Sponsors].
14+
15+
== New Features
16+
17+
* pr:6990[], pr:6991[], pr:6989[], pr:6999[], pr:7001[] produce `rust-analyzer-aarch64-apple-darwin` builds.
18+
* pr:6964[] add full pattern completions
19+
+
20+
image::https://user-images.githubusercontent.com/3757771/102785796-d1e0da80-439e-11eb-934b-218ada31b51c.gif[]
21+
* pr:6984[] remove TextMate grammar -- it is now included with VS Code.
22+
* pr:6746[] **Extract Module to File** assist.
23+
+
24+
image::https://user-images.githubusercontent.com/13580199/102748269-33a44300-43a5-11eb-9e37-f5fcb8e62f73.gif[]
25+
* pr:7009[] rename module when renaming file.
26+
+
27+
image::https://user-images.githubusercontent.com/4325700/102942807-59ece000-4484-11eb-970b-61b3372534f1.gif[]
28+
* pr:6993[] clean up descriptions for settings.
29+
* pr:6960[] show enum variant on Self qualified.
30+
* pr:7019[] more helpful serde errors.
31+
* pr:7020[], pr:7010[] support for const blocks.
32+
* pr:7026[] coc-rust-analyzer supports inlay hints for variables and chaining.
33+
* pr:7021[], pr:7030[] support goto def, search and rename for lables.
34+
35+
== Fixes
36+
37+
* pr:6967[] correctly parse legacy trait objects with leading ForType.
38+
* pr:6965[] properly attach attributes to function parameters.
39+
* pr:6978[] filter out empty rustc spans.
40+
* pr:6981[] rename works from macro.
41+
* pr:6982[] remove parentheses when inverting `!(cond)`.
42+
* pr:6987[] delete related whitespace when removing unused param.
43+
* pr:7013[] don't think that /submod.rs is /mod.rs.
44+
* pr:7022[] prevent multiple incorrect case diagnostics in functions.
45+
* pr:7027[] fix macro_rules not accepting brackets or parentheses.
46+
* pr:7047[], pr:7047[] fix proc-macro related panics.
47+
* pr:7050[] fix composite tokens in declarative macros.
48+
49+
== Internal Improvements
50+
51+
* pr:7017[] document `make` module design.
52+
* pr:7043[] simplify assists resolution API.

0 commit comments

Comments
 (0)