Skip to content

Commit 6fa11b3

Browse files
committed
Changelog #88
1 parent 9acb317 commit 6fa11b3

File tree

4 files changed

+90
-12
lines changed

4 files changed

+90
-12
lines changed

generated_assists.adoc

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[discrete]
44
=== `add_explicit_type`
5-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_explicit_type.rs#L9[add_explicit_type.rs]
5+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/add_explicit_type.rs#L6[add_explicit_type.rs]
66

77
Specify type for a let binding.
88

@@ -407,7 +407,7 @@ fn qux(bar: Bar, baz: Baz) {}
407407

408408
[discrete]
409409
=== `extract_function`
410-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_function.rs#L28[extract_function.rs]
410+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_function.rs#L31[extract_function.rs]
411411

412412
Extracts selected statements into new function.
413413

@@ -860,7 +860,7 @@ impl From<u32> for A {
860860

861861
[discrete]
862862
=== `generate_function`
863-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_function.rs#L19[generate_function.rs]
863+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_function.rs#L20[generate_function.rs]
864864

865865
Adds a stub function with a signature matching the function under the cursor.
866866

@@ -891,7 +891,7 @@ fn bar(arg: &str, baz: Baz) ${0:-> ()} {
891891

892892
[discrete]
893893
=== `generate_getter`
894-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_getter.rs#L9[generate_getter.rs]
894+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_getter.rs#L10[generate_getter.rs]
895895

896896
Generate a getter method.
897897

@@ -919,7 +919,7 @@ impl Person {
919919

920920
[discrete]
921921
=== `generate_getter_mut`
922-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_getter.rs#L35[generate_getter.rs]
922+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/generate_getter.rs#L36[generate_getter.rs]
923923

924924
Generate a mut getter method.
925925

@@ -1156,8 +1156,7 @@ impl<'a> Cursor<'a> {
11561156
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/invert_if.rs#L12[invert_if.rs]
11571157

11581158
This transforms if expressions of the form `if !x {A} else {B}` into `if x {B} else {A}`
1159-
This also works with `!=`. This assist can only be applied with the cursor
1160-
on `if`.
1159+
This also works with `!=`. This assist can only be applied with the cursor on `if`.
11611160

11621161
.Before
11631162
```rust
@@ -1570,6 +1569,27 @@ impl Foo for Bar {
15701569
```
15711570

15721571

1572+
[discrete]
1573+
=== `replace_char_with_string`
1574+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_string_with_char.rs#L51[replace_string_with_char.rs]
1575+
1576+
Replace a char literal with a string literal.
1577+
1578+
.Before
1579+
```rust
1580+
fn main() {
1581+
find('{┃');
1582+
}
1583+
```
1584+
1585+
.After
1586+
```rust
1587+
fn main() {
1588+
find("{");
1589+
}
1590+
```
1591+
1592+
15731593
[discrete]
15741594
=== `replace_derive_with_manual_impl`
15751595
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_derive_with_manual_impl.rs#L19[replace_derive_with_manual_impl.rs]
@@ -1752,9 +1772,9 @@ fn process(map: HashMap<String, String>) {}
17521772

17531773
[discrete]
17541774
=== `replace_string_with_char`
1755-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_string_with_char.rs#L5[replace_string_with_char.rs]
1775+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/replace_string_with_char.rs#L11[replace_string_with_char.rs]
17561776

1757-
Replace string with char.
1777+
Replace string literal with char literal.
17581778

17591779
.Before
17601780
```rust

generated_config.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ Whether to show `Method References` lens. Only applies when
353353
Whether to show `References` lens. Only applies when
354354
`#rust-analyzer.lens.enable#` is set.
355355
--
356+
[[rust-analyzer.lens.forceCustomCommands]]rust-analyzer.lens.forceCustomCommands (default: `true`)::
357+
+
358+
--
359+
Internal config: use custom client-side commands even when the
360+
client doesn't set the corresponding capability.
361+
--
356362
[[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
357363
+
358364
--

generated_features.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ Highlights constructs related to the thing under the cursor:
256256
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
257257

258258
== Hover
259-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/hover.rs#L70[hover.rs]
259+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/hover.rs#L74[hover.rs]
260260

261-
Shows additional information, like type of an expression or documentation for definition when "focusing" code.
261+
Shows additional information, like the type of an expression or the documentation for a definition when "focusing" code.
262262
Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
263263

264264
image::https://user-images.githubusercontent.com/48062697/113020658-b5f98b80-917a-11eb-9f88-3dbc27320c95.gif[]
@@ -294,7 +294,7 @@ image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917
294294
// IMPORTANT: master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
295295

296296
== Join Lines
297-
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/join_lines.rs#L21[join_lines.rs]
297+
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/join_lines.rs#L20[join_lines.rs]
298298

299299
Join selected lines into one, smartly fixing up whitespace, trailing commas, and braces.
300300

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
= Changelog #88
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:df0936b4af7bd573dc8906b6dbdbf80ff40b75f3[] +
6+
Release: release:2021-08-02[]
7+
8+
== Sponsors
9+
10+
**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or
11+
https://github.com/sponsors/rust-analyzer[GitHub Sponsors].
12+
13+
== New Features
14+
15+
* pr:9693[] (first contribution) add Hover Range capability to get the type of an expression:
16+
+
17+
image::https://user-images.githubusercontent.com/22298999/126914293-0ce49a92-545d-4005-a59e-9294fa2330d6.gif[]
18+
* pr:9715[], pr:9719[] make completions respect `#[doc(hidden)]`.
19+
* pr:9731[] add "Replace char with string" assist.
20+
* pr:9732[] gate custom clint-side commands behind capabilities.
21+
* pr:9740[] make "Add explicit type" work for closure parameters.
22+
* pr:9593[] make "Remove unused param" work for methods and associated functions.
23+
24+
== Fixes
25+
26+
* pr:9749[] (first contribution) exclude `rust-analyzer.server.path` from VS Code's sync feature.
27+
* pr:9744[] annotate type hints for pattern name ranges instead of the pattern itself:
28+
+
29+
image::https://user-images.githubusercontent.com/3757771/127741276-e1dd173b-2964-4df0-abae-860283b2e1be.png[]
30+
+
31+
image::https://user-images.githubusercontent.com/3757771/127741277-e7fc2836-4f31-4c45-a3a9-69cbff3d52d9.png[]
32+
* pr:9558[] do not erase Cargo diagnostics from the closed documents.
33+
* pr:9699[] parse extra ``::``s in generic arguments.
34+
* pr:9701[] correctly update diagnostics when files are opened and closed.
35+
* pr:9709[] add capability for the "Open ``Cargo.toml``" LSP extension.
36+
* pr:9710[] don't qualify `self` as `crate` in "Add missing impl members".
37+
* pr:9700[] remove the legacy macro scoping hack.
38+
* pr:9722[] refine the targets of the "Extract function" assist.
39+
* pr:9728[] attach comma token to `MATCH_ARM` instead of `MATCH_ARM_LIST`.
40+
* pr:9742[] fix hover range for derive inputs.
41+
* pr:9739[] favor ``deref``fed types in "Generate function" assist.
42+
* pr:9747[] wrap inner tail expressions in the "Missing `Ok` or ``Some``" diagnostic.
43+
44+
== Internal Improvements
45+
46+
* pr:9718[] (first contribution) bump `notify` version.
47+
* pr:9716[] stop reexporting ``hir_def``'s `ItemInNs` from HIR.
48+
* pr:9724[] use more strictly-typed syntax nodes for analysis in "Extract function".
49+
* pr:9727[] simplify the "Extract function" assist.
50+
* pr:9743[] improve completion profiling.
51+
* pr:9746[] add API to check what are the max limits in practice.
52+
* pr:9703[] fix several typos and grammar mistakes.

0 commit comments

Comments
 (0)