Skip to content

Commit f45b0f2

Browse files
committed
Changelog #115
1 parent ff9d4b8 commit f45b0f2

File tree

3 files changed

+62
-28
lines changed

3 files changed

+62
-28
lines changed

generated_assists.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,13 +585,14 @@ fn qux(bar: Bar, baz: Baz) {}
585585
=== `extract_function`
586586
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_assists/src/handlers/extract_function.rs#L35[extract_function.rs]
587587

588-
Extracts selected statements into new function.
588+
Extracts selected statements and comments into new function.
589589

590590
.Before
591591
```rust
592592
fn main() {
593593
let n = 1;
594594
┃let m = n + 2;
595+
// calculate
595596
let k = m + n;┃
596597
let g = 3;
597598
}
@@ -607,6 +608,7 @@ fn main() {
607608

608609
fn ┃fun_name(n: i32) {
609610
let m = n + 2;
611+
// calculate
610612
let k = m + n;
611613
}
612614
```

manual.adoc

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ To disable this notification put the following to `settings.json`
6767
----
6868
====
6969

70-
The server binary is stored in:
70+
The server binary is stored in the extension install directory, which starts with `matklad.rust-analyzer-` and is located under:
7171

72-
* Linux: `~/.config/Code/User/globalStorage/matklad.rust-analyzer`
73-
* Linux (Remote, such as WSL): `~/.vscode-server/data/User/globalStorage/matklad.rust-analyzer`
74-
* macOS: `~/Library/Application\ Support/Code/User/globalStorage/matklad.rust-analyzer`
75-
* Windows: `%APPDATA%\Code\User\globalStorage\matklad.rust-analyzer`
72+
* Linux: `~/.vscode/extensions`
73+
* Linux (Remote, such as WSL): `~/.vscode-server/extensions`
74+
* macOS: `~/.vscode/extensions`
75+
* Windows: `%USERPROFILE%\.vscode\extensions`
7676

77-
However, if you are using a version of the extension with a bundled server binary and you are not running NixOS, the server binary might be instead running from: `~/.vscode/extensions/matklad.rust-analyzer-VERSION`.
77+
As an exception, on NixOS, the extension makes a copy of the server and stores it under `~/.config/Code/User/globalStorage/matklad.rust-analyzer`.
7878

79-
Note that we only support two most recent versions of VS Code.
79+
Note that we only support the two most recent versions of VS Code.
8080

8181
==== Updates
8282

@@ -86,27 +86,12 @@ It will ask your permission to download the matching language server version bin
8686
===== Nightly
8787

8888
We ship nightly releases for VS Code.
89+
You can opt in to these by switching to the pre-release version in the Code extension page or settings.
8990
To help us out with testing the newest code and follow the bleeding edge of our `master`, please use the following config:
9091

91-
[source,json]
92-
----
93-
{ "rust-analyzer.updates.channel": "nightly" }
94-
----
95-
96-
You will be prompted to install the `nightly` extension version.
97-
Just click `Download now` and from that moment you will get automatic updates every 24 hours.
98-
99-
If you don't want to be asked for `Download now` every day when the new nightly version is released add the following to your `settings.json`:
100-
[source,json]
101-
----
102-
{ "rust-analyzer.updates.askBeforeDownload": false }
103-
----
104-
105-
NOTE: Nightly extension should **only** be installed via the `Download now` action from VS Code.
106-
10792
==== Manual installation
10893

109-
Alternatively, procure both `rust-analyzer.vsix` and your platform's matching `rust-analyzer-{platform}`, for example from the
94+
Alternatively, download a VSIX corresponding to your platform from the
11095
https://github.com/rust-analyzer/rust-analyzer/releases[releases] page.
11196

11297
Install the extension with the `Extensions: Install from VSIX` command within VS Code, or from the command line via:
@@ -115,23 +100,24 @@ Install the extension with the `Extensions: Install from VSIX` command within VS
115100
$ code --install-extension /path/to/rust-analyzer.vsix
116101
----
117102

118-
Copy the `rust-analyzer-{platform}` binary anywhere, then add the path to your settings.json, for example:
103+
If you are running an unsupported platform, you can install `rust-analyzer-no-server.vsix` and compile or obtain a server binary.
104+
Copy the server anywhere, then add the path to your settings.json, for example:
119105
[source,json]
120106
----
121107
{ "rust-analyzer.server.path": "~/.local/bin/rust-analyzer-linux" }
122108
----
123109

124110
==== Building From Source
125111

126-
Alternatively, both the server and the Code plugin can be installed from source:
112+
Both the server and the Code plugin can be installed from source:
127113

128114
[source]
129115
----
130116
$ git clone https://github.com/rust-analyzer/rust-analyzer.git && cd rust-analyzer
131117
$ cargo xtask install
132118
----
133119

134-
You'll need Cargo, nodejs and npm for this.
120+
You'll need Cargo, nodejs (matching a supported version of VS Code) and npm for this.
135121

136122
Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually.
137123

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
= Changelog #115
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:ba330548023607717295f0dfd61b72eda41aa9dd[] +
6+
Release: release:2022-02-07[]
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:11384[] complete local function and closure parameters from surrounding scopes:
16+
+
17+
image::https://user-images.githubusercontent.com/3757771/152641087-78f8e4c4-275c-4259-a17e-9fe2cc698269.gif[]
18+
* pr:11401[] add ABI string completions:
19+
+
20+
image::https://user-images.githubusercontent.com/3757771/152686208-4546f830-e6bd-47f0-ae48-4bb48b499a73.png[]
21+
* pr:11293[], pr:11395[] implement format string completion:
22+
+
23+
video::https://user-images.githubusercontent.com/308347/152745371-f6b9a801-ddf1-41ae-afc1-c148f7bfddef.mp4[options=loop]
24+
* pr:11393[] complete functions and methods from block level impls.
25+
* pr:11394[] de-prioritize completions of private but editable definitions.
26+
27+
== Fixes
28+
29+
* pr:11182[] (first contribution) don't panic on seeing an unexpected offset.
30+
* pr:11412[] (first contribution) include `fn`/`type`/`const` keyword in trait impl completion item source ranges.
31+
* pr:11388[] fix proc-macro server not using the supplied span in `Ident::new`:
32+
+
33+
image::https://user-images.githubusercontent.com/3757771/151827812-c03b8fc7-7ecf-4959-804a-2680d8e61e8b.png[]
34+
* pr:11390[] de-prioritize completions of qualified operator function completions.
35+
* pr:11322[] include comments in "Extract function".
36+
* pr:11399[] fix assoc type shorthand from method bounds.
37+
* pr:11402[] fix visibility restriction path completions always using the parent module.
38+
39+
== Internal Improvements
40+
41+
* pr:11416[] (first contribution) fix `eslint` LSP config.
42+
* pr:11418[] (first contribution) bump `pulldown-cmark-to-cmark` to fix link rendering bug.
43+
* pr:11291[] make range up-mapping more precise.
44+
* pr:11397[] refactor completion module split.
45+
* pr:11403[] shrink `mbe::ExpandError` and `mbe::ParseError`.
46+
* pr:11406[] update install notes for bundled servers.

0 commit comments

Comments
 (0)