From 94efad9202a428ee5f66f7cd5e81bcc426ec0d82 Mon Sep 17 00:00:00 2001 From: Jane Lewis Date: Tue, 11 Jun 2024 11:45:55 -0700 Subject: [PATCH] Add a show_err_msg invocation to the warning about being unable to take a snapshot --- crates/ruff_server/src/server/api/requests/execute_command.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ruff_server/src/server/api/requests/execute_command.rs b/crates/ruff_server/src/server/api/requests/execute_command.rs index 77c8597badb1e..4f27b9e756550 100644 --- a/crates/ruff_server/src/server/api/requests/execute_command.rs +++ b/crates/ruff_server/src/server/api/requests/execute_command.rs @@ -69,7 +69,8 @@ impl super::SyncRequestHandler for ExecuteCommand { let mut edit_tracker = WorkspaceEditTracker::new(session.resolved_client_capabilities()); for Argument { uri, version } in arguments { let Some(snapshot) = session.take_snapshot(uri.clone()) else { - tracing::warn!("Document at {uri} could not be opened"); + tracing::error!("Document at {uri} could not be opened"); + show_err_msg!("Ruff does not recognize this file"); return Ok(None); }; match command {