@@ -223,7 +223,7 @@ image::https://user-images.githubusercontent.com/48062697/113020654-b42fc800-917
223223
224224
225225=== Find All References
226- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/references.rs#L44 [references.rs]
226+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/references.rs#L42 [references.rs]
227227
228228Shows all references of the item at the cursor location
229229
@@ -270,7 +270,7 @@ Navigates to the declaration of an identifier.
270270
271271This is the same as `Go to Definition` with the following exceptions:
272272- outline modules will navigate to the `mod name;` item declaration
273- - trait assoc items will navigate to the assoc item of the trait declaration opposed to the trait impl
273+ - trait assoc items will navigate to the assoc item of the trait declaration as opposed to the trait impl
274274- fields in patterns will navigate to the field declaration of the struct, union or variant
275275
276276
@@ -334,7 +334,7 @@ Note: `?`, `|` and `->` do not currently trigger this behavior in the VSCode edi
334334
335335
336336=== Hover
337- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/hover.rs#L98 [hover.rs]
337+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/hover.rs#L101 [hover.rs]
338338
339339Shows additional information, like the type of an expression or the documentation for a definition when "focusing" code.
340340Focusing is usually hovering with a mouse, but can also be triggered with a shortcut.
@@ -343,7 +343,7 @@ image::https://user-images.githubusercontent.com/48062697/113020658-b5f98b80-917
343343
344344
345345=== Inlay Hints
346- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L433 [inlay_hints.rs]
346+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/inlay_hints.rs#L441 [inlay_hints.rs]
347347
348348rust-analyzer shows additional information inline with the source code.
349349Editors usually render this using read-only virtual text snippets interspersed with code.
@@ -360,6 +360,23 @@ Optionally, one can enable additional hints for
360360* elided lifetimes
361361* compiler inserted reborrows
362362
363+ Note: inlay hints for function argument names are heuristically omitted to reduce noise and will not appear if
364+ any of the
365+ link:https://github.com/rust-lang/rust-analyzer/blob/6b8b8ff4c56118ddee6c531cde06add1aad4a6af/crates/ide/src/inlay_hints/param_name.rs#L92-L99[following criteria]
366+ are met:
367+
368+ * the parameter name is a suffix of the function's name
369+ * the argument is a qualified constructing or call expression where the qualifier is an ADT
370+ * exact argument<->parameter match(ignoring leading underscore) or parameter is a prefix/suffix
371+ of argument with _ splitting it off
372+ * the parameter name starts with `ra_fixture`
373+ * the parameter name is a
374+ link:https://github.com/rust-lang/rust-analyzer/blob/6b8b8ff4c56118ddee6c531cde06add1aad4a6af/crates/ide/src/inlay_hints/param_name.rs#L200[well known name]
375+ in a unary function
376+ * the parameter name is a
377+ link:https://github.com/rust-lang/rust-analyzer/blob/6b8b8ff4c56118ddee6c531cde06add1aad4a6af/crates/ide/src/inlay_hints/param_name.rs#L201[single character]
378+ in a unary function
379+
363380image::https://user-images.githubusercontent.com/48062697/113020660-b5f98b80-917a-11eb-8d70-3be3fd558cdd.png[]
364381
365382
@@ -392,7 +409,7 @@ image::https://user-images.githubusercontent.com/48062697/113020661-b6922200-917
392409
393410
394411=== Magic Completions
395- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/lib.rs#L45 [lib.rs]
412+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/lib.rs#L44 [lib.rs]
396413
397414In addition to usual reference completion, rust-analyzer provides some ✨magic✨
398415completions as well:
@@ -414,6 +431,7 @@ There are postfix completions, which can be triggered by typing something like
414431- `expr.ref` -> `&expr`
415432- `expr.refm` -> `&mut expr`
416433- `expr.let` -> `let $0 = expr;`
434+ - `expr.lete` -> `let $1 = expr else { $0 };`
417435- `expr.letm` -> `let mut $0 = expr;`
418436- `expr.not` -> `!expr`
419437- `expr.dbg` -> `dbg!(expr)`
@@ -556,7 +574,7 @@ image::https://user-images.githubusercontent.com/48062697/113171066-105c2000-923
556574
557575
558576=== Open Docs
559- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L122 [doc_links.rs]
577+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L120 [doc_links.rs]
560578
561579Retrieve a links to documentation for the given symbol.
562580
@@ -585,7 +603,7 @@ image::https://user-images.githubusercontent.com/48062697/113065580-04c21800-91b
585603
586604
587605=== Related Tests
588- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L195 [runnables.rs]
606+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L213 [runnables.rs]
589607
590608Provides a sneak peek of all tests where the current item is used.
591609
@@ -600,7 +618,7 @@ the selected item. The context menu opens. Select **Peek Related Tests**.
600618
601619
602620=== Rename
603- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/rename.rs#L72 [rename.rs]
621+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/rename.rs#L73 [rename.rs]
604622
605623Renames the item below the cursor and all of its references
606624
@@ -614,7 +632,7 @@ image::https://user-images.githubusercontent.com/48062697/113065582-055aae80-91b
614632
615633
616634=== Run
617- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L111 [runnables.rs]
635+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/runnables.rs#L113 [runnables.rs]
618636
619637Shows a popup suggesting to run a test/benchmark/binary **at the current cursor
620638location**. Super useful for repeatedly running just a single test. Do bind this
@@ -790,7 +808,7 @@ Randomizes all crate IDs in the crate graph, for debugging.
790808
791809
792810=== Status
793- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/status.rs#L28 [status.rs]
811+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/status.rs#L27 [status.rs]
794812
795813Shows internal statistic about memory usage of rust-analyzer.
796814
@@ -803,7 +821,7 @@ image::https://user-images.githubusercontent.com/48062697/113065584-05f34500-91b
803821
804822
805823=== Structural Search and Replace
806- **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-ssr/src/lib.rs#L8 [lib.rs]
824+ **Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-ssr/src/lib.rs#L6 [lib.rs]
807825
808826Search and replace with named wildcards that will match any expression, type, path, pattern or item.
809827The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`.
@@ -1036,7 +1054,8 @@ workspace to dependencies.
10361054Note that filtering does not currently work in VSCode due to the editor never
10371055sending the special symbols to the language server. Instead, you can configure
10381056the filtering via the `rust-analyzer.workspace.symbol.search.scope` and
1039- `rust-analyzer.workspace.symbol.search.kind` settings.
1057+ `rust-analyzer.workspace.symbol.search.kind` settings. Symbols prefixed
1058+ with `__` are hidden from the search results unless configured otherwise.
10401059
10411060|===
10421061| Editor | Shortcut
0 commit comments