aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index d0c2a95ef..eecf278a8 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -248,8 +248,10 @@ fn main_loop_inner(
248 && pending_libraries.is_empty() 248 && pending_libraries.is_empty()
249 && in_flight_libraries == 0 249 && in_flight_libraries == 0
250 { 250 {
251 let n_packages: usize = state.workspaces.iter().map(|it| it.count()).sum();
251 if options.show_workspace_loaded { 252 if options.show_workspace_loaded {
252 show_message(req::MessageType::Info, "workspace loaded", msg_sender); 253 let msg = format!("workspace loaded, {} rust packages", n_packages);
254 show_message(req::MessageType::Info, msg, msg_sender);
253 } 255 }
254 // Only send the notification first time 256 // Only send the notification first time
255 send_workspace_notification = false; 257 send_workspace_notification = false;
@@ -508,12 +510,10 @@ fn update_file_notifications_on_threadpool(
508 }); 510 });
509} 511}
510 512
511fn show_message<M: Into<String>>(typ: req::MessageType, msg: M, sender: &Sender<RawMessage>) { 513fn show_message(typ: req::MessageType, message: impl Into<String>, sender: &Sender<RawMessage>) {
512 let not = RawNotification::new::<req::ShowMessage>(&req::ShowMessageParams { 514 let message = message.into();
513 typ, 515 let params = req::ShowMessageParams { typ, message };
514 message: msg.into(), 516 let not = RawNotification::new::<req::ShowMessage>(&params);
515 });
516
517 sender.send(not.into()).unwrap(); 517 sender.send(not.into()).unwrap();
518} 518}
519 519