From d4f185cd619aeef4ddeadfc73d581cb89f088c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Mon, 6 Dec 2021 08:39:25 +0200 Subject: [PATCH] Changelog #106 --- generated_features.adoc | 13 ++++-- thisweek/_posts/2021-12-06-changelog-106.adoc | 46 +++++++++++++++++++ 2 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 thisweek/_posts/2021-12-06-changelog-106.adoc diff --git a/generated_features.adoc b/generated_features.adoc index 07724fe8..57ec0de8 100644 --- a/generated_features.adoc +++ b/generated_features.adoc @@ -68,7 +68,7 @@ image::https://user-images.githubusercontent.com/48062697/113020673-b85be580-917 === Completion With Autoimport -**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/flyimport.rs#L17[flyimport.rs] +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/flyimport.rs#L18[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. @@ -610,9 +610,11 @@ Rust-analyzer currently emits the following token tags: - For items: + [horizontal] +attribute:: Emitted for attribute macros. enum:: Emitted for enums. function:: Emitted for free-standing functions. -macro:: Emitted for macros. +derive:: Emitted for derive macros. +macro:: Emitted for function-like macros. method:: Emitted for associated functions, also knowns as methods. namespace:: Emitted for modules. struct:: Emitted for structs. @@ -643,6 +645,7 @@ logical:: Emitted for the logical operators `||`, `&&`, `!`. + [horizontal] punctuation:: Emitted for general punctuation. +attributeBracket:: Emitted for attribute invocation brackets, that is the `#[` and `]` tokens. angle:: Emitted for `<>` angle brackets. brace:: Emitted for `{}` braces. bracket:: Emitted for `[]` brackets. @@ -655,7 +658,6 @@ Semi:: Emitted for the `;` token. //- [horizontal] -attribute:: Emitted for the `#[` `]` tokens. builtinAttribute:: Emitted for names to builtin attributes in attribute path, the `repr` in `#[repr(u8)]` for example. builtinType:: Emitted for builtin types like `u32`, `str` and `f32`. comment:: Emitted for comments. @@ -668,6 +670,7 @@ lifetime:: Emitted for lifetimes. parameter:: Emitted for non-self function parameters. property:: Emitted for struct and union fields. selfKeyword:: Emitted for the self function parameter and self path-specifier. +toolModule:: Emitted for tool modules. typeParameter:: Emitted for type parameters. unresolvedReference:: Emitted for unresolved references, names that rust-analyzer can't find the definition of. variable:: Emitted for locals, constants and statics. @@ -720,7 +723,7 @@ image::https://user-images.githubusercontent.com/48062697/113065586-068bdb80-91b === Status -**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/status.rs#L26[status.rs] +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/status.rs#L25[status.rs] Shows internal statistic about memory usage of rust-analyzer. @@ -878,7 +881,7 @@ image::https://user-images.githubusercontent.com/48062697/113065588-068bdb80-91b === Workspace Symbol -**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_db/src/symbol_index.rs#L148[symbol_index.rs] +**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_db/src/symbol_index.rs#L159[symbol_index.rs] Uses fuzzy-search to find types, modules and functions by name across your project and dependencies. This is **the** most useful feature, which improves code diff --git a/thisweek/_posts/2021-12-06-changelog-106.adoc b/thisweek/_posts/2021-12-06-changelog-106.adoc new file mode 100644 index 00000000..505bcda6 --- /dev/null +++ b/thisweek/_posts/2021-12-06-changelog-106.adoc @@ -0,0 +1,46 @@ += Changelog #106 +:sectanchors: +:page-layout: post + +Commit: commit:7d6fcbc0be2151bfa85ec146545b42d8be2fb28c[] + +Release: release:2021-12-06[] + +== Sponsors + +**Become a sponsor:** On https://opencollective.com/rust-analyzer/[OpenCollective] or +https://github.com/sponsors/rust-analyzer[GitHub Sponsors]. + +== New Features + +* pr:10915[] resolve built-in attributes and tools in `ide`: ++ +image::https://user-images.githubusercontent.com/3757771/144661639-dbd324df-807c-4cc0-b860-4953a98b9fa5.png[] ++ +image::https://user-images.githubusercontent.com/3757771/144661637-e9276cc8-e975-420e-ab32-29fa7732a21f.png[] +* pr:10943[] enable completions for attributes: ++ +image::https://user-images.githubusercontent.com/3757771/144752483-5dd868fb-b0f3-4f69-9db3-859f0414dc06.gif[] +* pr:10916[] implement `while let ...` to `loop { if let ...}` conversion in the `convert_while_to_loop` assist. + +== Fixes + +* pr:10906[] (first contributation) "add return type" assist when missing whitespace before brace. +* pr:10896[] resolve associated trait types in paths. +* pr:10902[] handle multiple cargo check quick fix spans. +* pr:10920[] shorten spans of `mismatched_arg_count` diagnostics. +* pr:10930[] fix `self` highlighting in imports. +* pr:10899[] add hack to highlight `self` properly with some proc macro crates. +* pr:10937[] add back highlighting hack for unresolved attributes. +* pr:10841[] emit moniker in LSIF. +* pr:10891[] emit trait names in moniker identifier. +* pr:10871[], pr:10905[], pr:10940[] try to respect `http.proxyStrictSSL`. + +== Internal Improvements + +* pr:10872[] build symbol index from crate def map +* pr:10887[] update bug report template to include version info. +* pr:10919[] add missing semantic tokens to `package.json`. +* pr:10897[] make client-side tests actually work. +* pr:10903[] replace `mocha` with a custom test runner. +* pr:10929[] split up macro/attribute semantic tokens a bit more. +* pr:10944[] prefer resolution of inert attributes.