diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-20 09:27:16 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-20 09:27:16 +0100 |
commit | 8bb37737c9e8b7a390ae29d5fb0daaeeb495d2b5 (patch) | |
tree | 0f8d45124abe86151e1954c1766534116e174209 /crates/syntax/test_data/parser/ok/0007_extern_crate.rast | |
parent | 764241e38e46316b6370977e8b51e841e93e84b9 (diff) | |
parent | 2bf720900f94e36969af44ff8ac52470faf9af4b (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/syntax/test_data/parser/ok/0007_extern_crate.rast')
0 files changed, 0 insertions, 0 deletions