rust/crates/rust-analyzer/src
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
..
bin feat: avoid checking the whole project during initial loading 2021-04-12 15:29:31 +03:00
cli Add a way to resolve certain assists 2021-05-03 17:14:49 +03:00
diagnostics Code review feedback. 2021-04-21 15:10:53 -07:00
caps.rs feat: allow clients to feature detect symbol filtering 2021-05-19 13:28:58 +03:00
cargo_target_spec.rs Fix build script dependencies 2021-05-12 14:48:26 +02:00
cli.rs internal: switch from CLI to internal benchmarking 2021-03-30 12:47:23 +03:00
config.rs Merge #8873 2021-05-20 08:27:16 +00:00
diagnostics.rs Code review feedback. 2021-04-21 15:10:53 -07:00
diff.rs Split textDocument/formatting TextEdit with diff 2020-12-31 15:33:20 +01:00
dispatch.rs internal: add rust-analyzer version to panic context 2021-05-08 14:14:06 +03:00
document.rs Latest LSP 3.16 protocol 2020-11-16 15:10:13 -05:00
from_proto.rs internal: unfork code paths for unresolved and resolved assist 2021-04-13 10:59:15 +03:00
global_state.rs Ensure that only one cache priming task can run at a time 2021-04-30 16:48:11 +02:00
handlers.rs Add new LSP extension for workspace symbol lookup 2021-05-18 00:40:30 +02:00
integrated_benchmarks.rs Replace ImportGranularity::Guess with guessing boolean flag 2021-05-19 15:57:10 +02:00
lib.rs internal: add integrated completion benchmark 2021-05-04 15:14:33 +03:00
line_index.rs Fix bitrotted module name 2021-02-16 19:17:32 +03:00
lsp_ext.rs Add new LSP extension for workspace symbol lookup 2021-05-18 00:40:30 +02:00
lsp_utils.rs Use CompletionTextEdit::InsertAndReplace if supported by the client 2021-04-08 15:21:27 +02:00
main_loop.rs Add new LSP extension for workspace symbol lookup 2021-05-18 00:40:30 +02:00
markdown.rs Check for rust doc code attributes like rustdoc does 2021-04-19 13:32:52 +02:00
op_queue.rs More robust status notifications 2021-04-06 15:45:31 +03:00
reload.rs Add profiling spans under cargo_to_crate_graph 2021-04-22 21:25:29 +03:00
request_metrics.rs Flatten module hierarchy 2020-06-24 18:57:30 +02:00
semantic_tokens.rs minor: adjust config name 2021-05-17 18:37:06 +03:00
thread_pool.rs Improve prime_caches and display its progress 2020-10-12 13:35:01 +02:00
to_proto.rs Replace ImportGranularity::Guess with guessing boolean flag 2021-05-19 15:57:10 +02:00