Skip to content

Commit

Permalink
Changelog #267
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Jan 6, 2025
1 parent 48f38ea commit b5676bd
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 6 deletions.
4 changes: 2 additions & 2 deletions generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ fn main() {

[discrete]
=== `destructure_tuple_binding`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/destructure_tuple_binding.rs#L20[destructure_tuple_binding.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/destructure_tuple_binding.rs#L19[destructure_tuple_binding.rs]

Destructures a tuple binding in place.

Expand Down Expand Up @@ -3346,7 +3346,7 @@ fn main() {
```rust
fn main() {
let x = Some(1);
if let Some(${0:x}) = x {}
if let Some(${0:x1}) = x {}
}
```

Expand Down
50 changes: 50 additions & 0 deletions generated_config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,35 @@ In `match` arms it completes a comma instead.
--
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.
--
[[rust-analyzer.completion.autoimport.exclude]]rust-analyzer.completion.autoimport.exclude::
+
--
Default:
----
[
{
"path": "core::borrow::Borrow",
"type": "methods"
},
{
"path": "core::borrow::BorrowMut",
"type": "methods"
}
]
----
A list of full paths to items to exclude from auto-importing completions.

Traits in this list won't have their methods suggested in completions unless the trait
is in scope.

You can either specify a string path which defaults to type "always" or use the more verbose
form `{ "path": "path::to::item", type: "always" }`.

For traits the type "methods" can be used to only exclude the methods but not the trait itself.

This setting also inherits `#rust-analyzer.completion.excludeTraits#`.

--
[[rust-analyzer.completion.autoself.enable]]rust-analyzer.completion.autoself.enable (default: `true`)::
+
Expand All @@ -297,6 +326,15 @@ with `self` prefixed to them when inside a method.
--
Whether to add parenthesis and argument snippets when completing function.
--
[[rust-analyzer.completion.excludeTraits]]rust-analyzer.completion.excludeTraits (default: `[]`)::
+
--
A list of full paths to traits whose methods to exclude from completion.

Methods from these traits won't be completed, even if the trait is in scope. However, they will still be suggested on expressions whose type is `dyn Trait`, `impl Trait` or `T where T: Trait`.

Note that the trait themselves can still be completed.
--
[[rust-analyzer.completion.fullFunctionSignatures.enable]]rust-analyzer.completion.fullFunctionSignatures.enable (default: `false`)::
+
--
Expand Down Expand Up @@ -497,6 +535,12 @@ Whether to show `References` action. Only applies when
Whether to show `Run` action. Only applies when
`#rust-analyzer.hover.actions.enable#` is set.
--
[[rust-analyzer.hover.actions.updateTest.enable]]rust-analyzer.hover.actions.updateTest.enable (default: `true`)::
+
--
Whether to show `Update Test` action. Only applies when
`#rust-analyzer.hover.actions.enable#` and `#rust-analyzer.hover.actions.run.enable#` are set.
--
[[rust-analyzer.hover.documentation.enable]]rust-analyzer.hover.documentation.enable (default: `true`)::
+
--
Expand Down Expand Up @@ -808,6 +852,12 @@ Only applies when `#rust-analyzer.lens.enable#` is set.
Whether to show `Run` lens. Only applies when
`#rust-analyzer.lens.enable#` is set.
--
[[rust-analyzer.lens.updateTest.enable]]rust-analyzer.lens.updateTest.enable (default: `true`)::
+
--
Whether to show `Update Test` lens. Only applies when
`#rust-analyzer.lens.enable#` and `#rust-analyzer.lens.run.enable#` are set.
--
[[rust-analyzer.linkedProjects]]rust-analyzer.linkedProjects (default: `[]`)::
+
--
Expand Down
6 changes: 3 additions & 3 deletions generated_features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917


=== Completion With Autoimport
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/completions/flyimport.rs#L19[flyimport.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/completions/flyimport.rs#L20[flyimport.rs]

When completing names in the current scope, proposes additional imports from other modules or crates,
if they can be qualified in the scope, and their name contains all symbols from the completion input.
Expand Down Expand Up @@ -606,7 +606,7 @@ image::https://user-images.githubusercontent.com/48062697/113065580-04c21800-91b


=== Related Tests
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L200[runnables.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L203[runnables.rs]

Provides a sneak peek of all tests where the current item is used.

Expand Down Expand Up @@ -635,7 +635,7 @@ image::https://user-images.githubusercontent.com/48062697/113065582-055aae80-91b


=== Run
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L113[runnables.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L116[runnables.rs]

Shows a popup suggesting to run a test/benchmark/binary **at the current cursor
location**. Super useful for repeatedly running just a single test. Do bind this
Expand Down
2 changes: 1 addition & 1 deletion thisweek/_posts/2024-12-30-changelog-266.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Release: release:2024-12-30[] (`v0.3.2237`)
* pr:18761[] swallow `config value is not set` Cargo error.
* pr:18754[] clean up target fetching for Cargo metadata.
* pr:18785[] clean up toolchain info fetching.
* pr:18750[] revert "disable `rustc` test metrics".
* pr:18750[] revert "disable `rustc` test metrics".
* pr:18787[] automatically cancel CI checks on new push to PR.
42 changes: 42 additions & 0 deletions thisweek/_posts/2025-01-06-changelog-267.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
= Changelog #267
:sectanchors:
:experimental:
:page-layout: post

Commit: commit:3f2bbe9fed9aba5e34c33d3e44898a332df157b2[] +
Release: release:2025-01-06[] (`v0.3.2249`)

== New Features

* pr:18757[] add support for updating `expect-test`, `insta` and `snapbox` snapshot tests.
* pr:18179[] allow excluding specific traits from completion.
* pr:18801[] show "Go to type definition" actions for generics substitutions on hover.
* pr:18821[] add support for `CoercePointee`.

== Fixes

* pr:18806[] (first contribution) re-enable crate graph de-duplication.
* pr:18797[] (first contribution) generate exhaustive `match` in "Replace `if-let` with `match`".
* pr:18758[] (first contribution) improve SCIP symbols.
* pr:18835[] hide synthetic locals from completions.
* pr:18791[] avoid generating colliding names in "Extract variable".
* pr:18794[] fix "Fill match arm" producing an extra brace in some proc macros.
* pr:18802[] use the correct `file_id` used for ranges for outgoing calls.
* pr:18807[], pr:18841[] populate cargo config environment variables.
* pr:18826[], pr:18848[], pr:18817[] properly clear flycheck diagnostics.
* pr:18819[] fix overflow detection in MIR evaluation.
* pr:18843[] correctly handle new-style `rustc_intrinsic` safety.
* pr:18845[] check the right package in flycheck.
* pr:18795[], pr:18820[] fix rendering of literals in code blocks.
* pr:18836[] be more permissive with completion resolve data.
* pr:18830[] fix custom snippet deserialization.

== Internal Improvements

* pr:18822[] (first contribution) allow `targetDir` to be an absolute path.
* pr:18327[], pr:18852[] store token trees in contiguous `Vec` instead of as a tree.
* pr:18809[] do not render closure ids in hover messages.
* pr:18790[] define a quoting mechanism instead of textual AST `make`.
* pr:18805[] implement `<RaSpanServer as SourceFile>::eq`.
* pr:18792[] decouple proc macro server protocol from the server implementation.
* pr:18829[], pr:18831[] revert 'revert "disable `rustc` test metrics"'.

0 comments on commit b5676bd

Please sign in to comment.