rust/crates
bors[bot] 8bb37737c9
Merge #8873
8873: Implement import-granularity guessing  r=matklad a=Veykril

This renames our `MergeBehavior` to `ImportGranularity` as rustfmt has it as the purpose of them are basically the same. `ImportGranularity::Preserve` currently has no specific purpose for us as we don't have an organize imports assist yet, so it currently acts the same as `ImportGranularity::Item`.

We now try to guess the import style on a per file basis and fall back to the user granularity setting if the file has no specific style yet or where it is ambiguous. This can be turned off by setting `import.enforceGranularity` to `true`.

Closes https://github.com/rust-analyzer/rust-analyzer/issues/8870

Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
2021-05-20 08:27:16 +00:00
..
base_db
cfg
flycheck Use package root as cargo check working directory 2021-05-12 19:50:52 -07:00
hir Simplify eager macro representation 2021-05-19 20:19:08 +02:00
hir_def Track in-scope derive helpers during nameres 2021-05-19 23:35:09 +02:00
hir_expand Track in-scope derive helpers during nameres 2021-05-19 23:35:09 +02:00
hir_ty Check patterns for type match recursively. 2021-05-19 11:08:59 +05:00
ide Fix prepare_rename failing for modules 2021-05-19 14:19:44 +02:00
ide_assists Merge #8873 2021-05-20 08:27:16 +00:00
ide_completion Replace ImportGranularity::Guess with guessing boolean flag 2021-05-19 15:57:10 +02:00
ide_db Merge #8873 2021-05-20 08:27:16 +00:00
ide_ssr
mbe
parser
paths
proc_macro_api
proc_macro_srv
proc_macro_test
profile
project_model Use package root as cargo check working directory 2021-05-12 19:50:52 -07:00
rust-analyzer Merge #8873 2021-05-20 08:27:16 +00:00
stdx
syntax fix: don't add extra whitespace around fields 2021-05-17 12:45:01 +03:00
test_utils
text_edit
toolchain
tt
vfs
vfs-notify