rust-analyzer/crates/rust-analyzer
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
..
src Merge #8873 2021-05-20 08:27:16 +00:00
tests/slow-tests internal: use more evocative test folder name 2021-05-17 19:01:54 +03:00
build.rs minor: standard snippet 2021-05-07 21:46:25 +03:00
Cargo.toml Use package renaming so source doesn't say tikv 2021-05-07 12:41:07 -07:00