diff --git a/Cargo.lock b/Cargo.lock index 7010a11..0db1967 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4142,7 +4142,7 @@ dependencies = [ [[package]] name = "zed-settings-sync-cli" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "assert_fs", @@ -4160,7 +4160,7 @@ dependencies = [ [[package]] name = "zed-settings-sync-lsp" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "assert_fs", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 382b7b8..f7ccd10 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zed-settings-sync-cli" description = "A CLI tool for Zed editor settings-sync extension" -version = "0.1.0" +version = "0.1.1" edition = "2024" [lints] diff --git a/extension.toml b/extension.toml index 12260cb..2d9e34f 100644 --- a/extension.toml +++ b/extension.toml @@ -1,6 +1,6 @@ id = "settings-sync" name = "Settings Sync" -version = "0.1.0" +version = "0.1.1" schema_version = 1 authors = ["Viktor Zahorodnii "] description = "Never again be afraid of losing your precious Zed configuration" diff --git a/lsp/Cargo.toml b/lsp/Cargo.toml index 08512c8..615e849 100644 --- a/lsp/Cargo.toml +++ b/lsp/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zed-settings-sync-lsp" description = "An LSP server for Zed editor settings-sync extension" -version = "0.1.0" +version = "0.1.1" edition = "2024" [lints] diff --git a/lsp/src/watching/path_store.rs b/lsp/src/watching/path_store.rs index 004d5d2..8fc0e03 100644 --- a/lsp/src/watching/path_store.rs +++ b/lsp/src/watching/path_store.rs @@ -36,11 +36,21 @@ impl PathStore { return; }; - if let Err(err) = sync_client_clone.sync_file(data).await { - error!("Could not sync file: {err}"); - lsp_client_clone - .show_message(MessageType::ERROR, err.to_string()) - .await; + match sync_client_clone.sync_file(data).await { + Ok(()) => { + lsp_client_clone + .show_message( + MessageType::INFO, + "Successfully synced".to_owned(), + ) + .await; + } + Err(err) => { + error!("Could not sync file: {err}"); + lsp_client_clone + .show_message(MessageType::ERROR, err.to_string()) + .await; + } } } Err(err) => { @@ -397,7 +407,13 @@ mod tests { .return_once(|_| Ok(())); let mut mock_lsp_client = MockLspClient::default(); - mock_lsp_client.expect_show_message().never(); + mock_lsp_client + .expect_show_message() + .with( + predicate::eq(MessageType::INFO), + predicate::eq("Successfully synced".to_owned()), + ) + .return_once(|_msg_type, _msg| Box::pin(async {})); PathStore::new(Arc::new(mock_sync_client), Arc::new(mock_lsp_client))?;