rust-analyzer/crates
bors 3c4d642d8b Auto merge of #16117 - mustakimali:mo-order, r=Veykril
feat: completion list suggests constructor like & builder methods first

When typing `MyType::` the completion items' order could be re-ordered based on how likely we want to select those:
* Constructors: `new` like functions to be able to create the type,
* Constructors that take args: Any other function that creates `Self`,
* Builder Methods: any builder methods available,
* Regular methods & associated functions (no change there)

![image](https://github.com/rust-lang/rust-analyzer/assets/1546896/54593b91-07b3-455a-8a71-8d203d4eaf4a)

In this photo, the order is:
* `new` constructor is first
* `new_builder` second is a builder method
* `aaaanew` is a constructor that takes arguments, is third  and is irrespective of its alphabetical order among names.

---

Another Example using actix `HttpServer` shows preferring constructor without `self` arg first (the `new` method)

![image](https://github.com/rust-lang/rust-analyzer/assets/1546896/938d3fb0-3d7a-4427-ae2f-ec02a834ccbe)

![image](https://github.com/rust-lang/rust-analyzer/assets/1546896/2c13860c-efd1-459d-b25e-df8adb61bbd0)

I've dropped my previous idea of highlighting these functions in the rustdoc (https://github.com/rust-lang/rust/pull/107926)
2024-02-13 12:06:25 +00:00
..
base-db feat: ignored and disabled macro expansion 2024-02-12 12:50:40 +01:00
cfg Merge commit '7219414e81810fd4d967136c4a0650523892c157' into sync-from-ra 2024-01-28 15:56:54 +02:00
flycheck flycheck: initial implementation of $saved_file 2024-02-12 15:45:48 +01:00
hir Cleanup term search related changes 2024-02-11 14:35:54 +02:00
hir-def Auto merge of #16540 - Veykril:macro-arg, r=Veykril 2024-02-12 16:32:40 +00:00
hir-expand internal: macro_arg query always returns a TokenTree 2024-02-12 17:19:41 +01:00
hir-ty Auto merge of #16092 - kilpkonn:term_search_1, r=Veykril 2024-02-12 14:47:12 +00:00
ide remove eprintln! overwrite 2024-02-12 23:54:32 -05:00
ide-assists remove eprintln! overwrite 2024-02-12 23:54:32 -05:00
ide-completion fix: clippy 2024-02-13 10:11:17 +00:00
ide-db Cleanup term search related changes 2024-02-11 14:35:54 +02:00
ide-diagnostics Auto merge of #16540 - Veykril:macro-arg, r=Veykril 2024-02-12 16:32:40 +00:00
ide-ssr ide-ssr: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
intern Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
limit Lint debug prints and disallowed types with clippy 2024-02-01 17:57:27 +01:00
load-cargo Encode disabled proc-macros via boolean flag, not special Expander 2024-02-12 13:39:38 +01:00
mbe fix: Fix macro transcriber emitting incorrect lifetime tokens 2024-02-11 12:10:38 +01:00
parser parser: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
paths Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
proc-macro-api proc-macro-api: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
proc-macro-srv fix: Validate literals in proc-macro-srv FreeFunctions::literal_from_str 2024-02-13 12:33:51 +01:00
proc-macro-srv-cli Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-ra 2024-02-04 10:37:58 +02:00
profile Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-ra 2024-02-04 10:37:58 +02:00
project-model fix: Fix target layout fetching 2024-02-12 21:29:52 +01:00
rust-analyzer Auto merge of #15476 - Wilfred:implement-saved-file3, r=Veykril 2024-02-12 14:59:37 +00:00
salsa internal: Remove SELF_REF hack for self referential SyntaxContexts 2024-02-10 16:20:02 +01:00
sourcegen sourcegen: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
span internal: Remove SELF_REF hack for self referential SyntaxContexts 2024-02-10 16:20:02 +01:00
stdx Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-ra 2024-02-04 10:37:58 +02:00
syntax fix: Validate literals in proc-macro-srv FreeFunctions::literal_from_str 2024-02-13 12:33:51 +01:00
test-fixture Encode disabled proc-macros via boolean flag, not special Expander 2024-02-12 13:39:38 +01:00
test-utils Cleanup term search related changes 2024-02-11 14:35:54 +02:00
text-edit text-edit: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:41 +09:00
toolchain internal: tool discovery prefers sysroot tools 2024-02-12 12:08:18 +01:00
tt fix: Fix macro transcriber emitting incorrect lifetime tokens 2024-02-11 12:10:38 +01:00
vfs vfs: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
vfs-notify Merge commit 'a9116523604c998e7781f60d3b5a6f586e0414a9' into sync-from-ra 2024-01-21 16:53:06 +02:00