rust-analyzer/crates
bors 58b6d46d5a Auto merge of #12333 - nolanderc:order-import-assist, r=Veykril
Order auto-imports by relevance

Fixes #10337.

Basically we sort the imports according to how "far away" the imported item is from where we want to import it to. This change makes it so that imports from the current crate are sorted before any third-party crates. Additionally, we make an exception for builtin crates (`std`, `core`, etc.) so that they are sorted before any third-party crates.

There are probably other heuristics that should be added to improve the experience (such as preferring imports that are common elsewhere in the same crate, and ranking crates depending on the dependency graph). However, I think this is a first good step.

PS. This is my first time contributing here, so please be gentle if I have missed something obvious :-)
2022-06-03 07:49:59 +00:00
..
base-db minor: Simplify 2022-05-20 16:52:10 +02:00
cfg minor: Bump dependencies 2022-03-22 17:42:24 +01:00
flycheck internal: Show more project building errors to the user 2022-04-14 11:31:01 +02:00
hir fix(ide-db): correct single-file module rename 2022-05-28 15:07:22 +03:00
hir-def feat: Support $$ in macros. 2022-06-02 21:48:28 +02:00
hir-expand minor: Simplify 2022-05-20 16:52:10 +02:00
hir-ty Auto merge of #12336 - bitgaoshu:mismatch, r=flodiebold 2022-05-31 09:48:54 +00:00
ide fix: float display impl 2022-05-31 10:13:03 +05:30
ide-assists Auto merge of #12333 - nolanderc:order-import-assist, r=Veykril 2022-06-03 07:49:59 +00:00
ide-completion minor: Remove unused code 2022-05-31 20:21:50 +02:00
ide-db Allow merging of multiple selected imports. 2022-06-02 23:15:55 +05:00
ide-diagnostics Auto merge of #12010 - Veykril:r-a-config, r=Veykril 2022-05-10 12:07:24 +00:00
ide-ssr internal: Remove unqualified_path completions module 2022-05-05 22:21:42 +02:00
limit Use compare_exchange_weak in limit::Limit::check 2022-01-28 18:19:35 +03:00
mbe feat: Support $$ in macros. 2022-06-02 21:48:28 +02:00
parser fix: parsing of ? opt-out trait bounds 2022-06-02 21:30:18 +08:00
paths Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
proc-macro-api style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
proc-macro-srv style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
proc-macro-test delete a generated swap file 2022-05-01 10:48:58 +00:00
profile internal: vendor lsp-server 2022-05-14 21:15:43 +01:00
project-model minor: log build script invocations 2022-05-24 22:56:49 +02:00
rust-analyzer Shorten main thread name 2022-06-03 07:27:48 +03:00
sourcegen Bump xshell and fix dist 2022-03-17 08:53:33 +02:00
stdx minor: Bump dependencies 2022-03-22 17:42:24 +01:00
syntax fix: f32 and f64 representation during lowering 2022-05-26 20:03:05 +05:30
test-utils style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
text-edit style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
toolchain Bump MSRV (1.57) 2021-12-16 01:56:12 +05:00
tt minor: Bump dependencies 2022-03-22 17:42:24 +01:00
vfs minor: Bump dependencies 2022-03-22 17:42:24 +01:00
vfs-notify Fix build on OpenBSD (and probably other BSDs too) 2022-05-22 17:04:57 -04:00