From 0fdca457df6baae3821fb026a1c0a85bca6642d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 31 Jan 2020 21:04:52 +0200 Subject: Improve auto import message --- crates/ra_assists/src/assists/auto_import.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'crates') diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs index 69126a1c9..932a52bff 100644 --- a/crates/ra_assists/src/assists/auto_import.rs +++ b/crates/ra_assists/src/assists/auto_import.rs @@ -64,12 +64,16 @@ pub(crate) fn auto_import( return None; } - ctx.add_assist_group(AssistId("auto_import"), "auto import", || { - proposed_imports - .into_iter() - .map(|import| import_to_action(import, &position, &path_to_import_syntax)) - .collect() - }) + ctx.add_assist_group( + AssistId("auto_import"), + format!("Import {}", path_to_import_syntax), + || { + proposed_imports + .into_iter() + .map(|import| import_to_action(import, &position, &path_to_import_syntax)) + .collect() + }, + ) } fn import_to_action(import: String, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { -- cgit v1.2.3