Skip to content

Commit 01eada6

Browse files
committed
Changelog #138
1 parent 48e2b11 commit 01eada6

5 files changed

Lines changed: 65 additions & 18 deletions

File tree

generated_assists.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ fn qux(bar: Bar, baz: Baz) {}
634634

635635
[discrete]
636636
=== `extract_function`
637-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L34[extract_function.rs]
637+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_function.rs#L36[extract_function.rs]
638638

639639
Extracts selected statements and comments into new function.
640640

@@ -1400,7 +1400,7 @@ impl MyStruct {
14001400

14011401
[discrete]
14021402
=== `generate_new`
1403-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_new.rs#L10[generate_new.rs]
1403+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/generate_new.rs#L13[generate_new.rs]
14041404

14051405
Adds a new inherent impl for a type.
14061406

generated_diagnostic.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This diagnostic is triggered if a function is invoked with an incorrect amount o
4444

4545

4646
=== missing-fields
47-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/missing_fields.rs#L17[missing_fields.rs]
47+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/missing_fields.rs#L20[missing_fields.rs]
4848

4949
This diagnostic is triggered if record lacks some fields that exist in the corresponding structure.
5050

@@ -134,7 +134,7 @@ This diagnostic is triggered if rust-analyzer is unable to discover referred mod
134134

135135

136136
=== unresolved-proc-macro
137-
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_proc_macro.rs#L5[unresolved_proc_macro.rs]
137+
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-diagnostics/src/handlers/unresolved_proc_macro.rs#L6[unresolved_proc_macro.rs]
138138

139139
This diagnostic is shown when a procedural macro can not be found. This usually means that
140140
procedural macro support is simply disabled (and hence is only a weak hint instead of an error),

generated_features.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use super::AssistContext;
3838

3939
.Import Granularity
4040

41-
It is possible to configure how use-trees are merged with the `importGranularity` setting.
41+
It is possible to configure how use-trees are merged with the `imports.granularity.group` setting.
4242
It has the following configurations:
4343

4444
- `crate`: Merge imports from the same crate into a single use statement. This kind of
@@ -48,11 +48,11 @@ It has the following configurations:
4848
- `preserve`: Do not change the granularity of any imports. For auto-import this has the same
4949
effect as `item`.
5050

51-
In `VS Code` the configuration for this is `rust-analyzer.assist.importGranularity`.
51+
In `VS Code` the configuration for this is `rust-analyzer.imports.granularity.group`.
5252

5353
.Import Prefix
5454

55-
The style of imports in the same crate is configurable through the `importPrefix` setting.
55+
The style of imports in the same crate is configurable through the `imports.prefix` setting.
5656
It has the following configurations:
5757

5858
- `crate`: This setting will force paths to be always absolute, starting with the `crate`
@@ -62,7 +62,7 @@ It has the following configurations:
6262
`super` or an extern crate identifier.
6363
- `plain`: This setting does not impose any restrictions in imports.
6464

65-
In `VS Code` the configuration for this is `rust-analyzer.assist.importPrefix`.
65+
In `VS Code` the configuration for this is `rust-analyzer.imports.prefix`.
6666

6767
image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917a-11eb-9022-59585f35d4f8.gif[]
6868

@@ -143,7 +143,7 @@ For the same reasons, avoids searching for any path imports for inputs with thei
143143

144144
.Import configuration
145145

146-
It is possible to configure how use-trees are merged with the `importMergeBehavior` setting.
146+
It is possible to configure how use-trees are merged with the `imports.granularity.group` setting.
147147
Mimics the corresponding behavior of the `Auto Import` feature.
148148

149149
.LSP and performance implications
@@ -835,12 +835,12 @@ be parsed as a valid structural search and replace rule.
835835

836836
rust-analyzer allows the user to define custom (postfix)-snippets that may depend on items to be accessible for the current scope to be applicable.
837837

838-
A custom snippet can be defined by adding it to the `rust-analyzer.completion.snippets` object respectively.
838+
A custom snippet can be defined by adding it to the `rust-analyzer.completion.snippets.custom` object respectively.
839839

840840
[source,json]
841841
----
842842
{
843-
"rust-analyzer.completion.snippets": {
843+
"rust-analyzer.completion.snippets.custom": {
844844
"thread spawn": {
845845
"prefix": ["spawn", "tspawn"],
846846
"body": [

manual.adoc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,16 @@ nvim_lsp.rust_analyzer.setup({
308308
on_attach=on_attach,
309309
settings = {
310310
["rust-analyzer"] = {
311-
assist = {
312-
importGranularity = "module",
313-
importPrefix = "self",
311+
imports = {
312+
granularity = {
313+
group = "module",
314+
},
315+
prefix = "self",
314316
},
315317
cargo = {
316-
loadOutDirsFromCheck = true
318+
buildScripts = {
319+
enable = true,
320+
},
317321
},
318322
procMacro = {
319323
enable = true
@@ -364,7 +368,9 @@ if executable('rust-analyzer')
364368
\ 'whitelist': ['rust'],
365369
\ 'initialization_options': {
366370
\ 'cargo': {
367-
\ 'loadOutDirsFromCheck': v:true,
371+
\ 'buildScripts': {
372+
\ 'enable': v:true,
373+
\ },
368374
\ },
369375
\ 'procMacro': {
370376
\ 'enable': v:true,
@@ -527,7 +533,9 @@ For example, a very common configuration is to enable proc-macro support, can be
527533
----
528534
{
529535
"cargo": {
530-
"loadOutDirsFromCheck": true,
536+
"buildScripts": {
537+
"enable": true,
538+
},
531539
},
532540
"procMacro": {
533541
"enable": true,
@@ -705,7 +713,7 @@ include::./generated_assists.adoc[]
705713
== Diagnostics
706714

707715
While most errors and warnings provided by rust-analyzer come from the `cargo check` integration, there's a growing number of diagnostics implemented using rust-analyzer's own analysis.
708-
Some of these diagnostics don't respect `\#[allow]` or `\#[deny]` attributes yet, but can be turned off using the `rust-analyzer.diagnostics.enable`, `rust-analyzer.diagnostics.enableExperimental` or `rust-analyzer.diagnostics.disabled` settings.
716+
Some of these diagnostics don't respect `\#[allow]` or `\#[deny]` attributes yet, but can be turned off using the `rust-analyzer.diagnostics.enable`, `rust-analyzer.diagnostics.experimental.enable` or `rust-analyzer.diagnostics.disabled` settings.
709717

710718
include::./generated_diagnostic.adoc[]
711719

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
= Changelog #138
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:897a7ec4b826f85ec1626870e734490701138097[] +
6+
Release: release:2022-07-18[]
7+
8+
== New Features
9+
10+
* pr:12539[] (first contribution) automatically instantiate trivial structs in `Generate new` and `Fill struct fields`.
11+
* pr:12778[], pr:12785[] (first contribution) support negative, `char` & `bool` const generics:
12+
+
13+
image::https://user-images.githubusercontent.com/29541480/179379863-b62475dd-e7bf-41f2-b437-08dfe55951af.png[]
14+
* pr:12696[] add quick fix for `&str` to `String` type mismatch:
15+
+
16+
video::https://user-images.githubusercontent.com/308347/179480044-bc6ff0a1-3ea3-45bc-bbf6-23181957ab3e.mp4[options=loop]
17+
* pr:12745[] implement `ignore` and `index` metavar expressions.
18+
* pr:12747[] update 1.63 proc macro ABI to match `rustc`.
19+
20+
== Fixes
21+
22+
* pr:12781[] fix stack overflows and wrong type inference of associated type shorthands.
23+
* pr:12691[] fix unresolved proc macro diagnostics pointing to macro expansions.
24+
* pr:12754[] fix VSCode status bar tooltip not showing the error messages.
25+
* pr:12556[] support generics in `Extract function`.
26+
* pr:12765[] insert imports after doc comments in inline modules.
27+
* pr:12766[] don't show qualified path completions for private items.
28+
* pr:12773[] improve `self` param completion applicability.
29+
* pr:12775[] improve syntax fixup, handle incomplete `if`.
30+
* pr:12712[] ignore renames for crate root.
31+
* pr:12735[] make `super::` completions depth-aware.
32+
33+
== Internal Improvements
34+
35+
* pr:12742[] (first contribution) fix references to obsolete config keys.
36+
* pr:12772[] remove allocation in `DefCollector::reseed_with_unresolved_attribute`.
37+
* pr:12689[] record all macro definitions in `ItemScope`.
38+
* pr:12764[], pr:12776[] remove deprecated `actions-rs/toolchain` action.
39+
* pr:12755[] set server binary version for GitHub builds.

0 commit comments

Comments
 (0)