From 427adf7b1cd0cc077fdf2aa19c735a6d0b406fe7 Mon Sep 17 00:00:00 2001 From: Viktor Zahorodnii Date: Tue, 20 Jan 2026 21:16:12 +0200 Subject: [PATCH 1/4] Rename settings_sync to settings-sync in Cargo.toml files --- cli/Cargo.toml | 2 +- lsp/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index fa18030..a2cb7d7 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zed-settings-sync-cli" -description = "A CLI tool for Zed editor settings_sync extension" +description = "A CLI tool for Zed editor settings-sync extension" version = "0.0.1-alpha.5" edition = "2024" diff --git a/lsp/Cargo.toml b/lsp/Cargo.toml index 9e0d479..672efbd 100644 --- a/lsp/Cargo.toml +++ b/lsp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zed-settings-sync-lsp" -description = "An LSP server for Zed editor settings_sync extension" +description = "An LSP server for Zed editor settings-sync extension" version = "0.0.1-alpha.5" edition = "2024" From 10a4add9da30bae364404c3e10ab537988565c1f Mon Sep 17 00:00:00 2001 From: Viktor Zahorodnii Date: Tue, 20 Jan 2026 21:16:47 +0200 Subject: [PATCH 2/4] Rename language server settings_sync to settings-sync in extension manifest --- extension.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension.toml b/extension.toml index 586dbc4..a8a3e81 100644 --- a/extension.toml +++ b/extension.toml @@ -6,10 +6,10 @@ authors = ["Viktor Zahorodnii "] description = "Never again be afraid of losing your precious Zed configuration" repository = "https://github.com/vittorius/zed-settings-sync" -[language_servers.settings_sync] +[language_servers.settings-sync] name = "Settings Sync LSP" languages = ["JSON", "JSONC"] -[language_servers.settings_sync.language_ids] +[language_servers.settings-sync.language_ids] "JSON" = "json" "JSONC" = "jsonc" From 94653170a52e00c228184f424ad4c42a1ca971d5 Mon Sep 17 00:00:00 2001 From: Viktor Zahorodnii Date: Tue, 20 Jan 2026 21:33:45 +0200 Subject: [PATCH 3/4] Rename settings_sync -> settings-sync in config keys --- ARCHITECTURE.md | 4 ++-- README.md | 4 ++-- common/src/config.rs | 18 +++++++++--------- common/src/sync/client/github_client.rs | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index c2979d7..68a54b2 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -40,7 +40,7 @@ On any command that requires interaction with Github: - use the Zed user-level `settings.json` file - check if it's present; if not, exit with an error message - - attempt to deserialize the config file into the same Config struct that is used in the LSP server backend ("/lsp/settings_sync/initialization_options" json path) + - attempt to deserialize the config file into the same Config struct that is used in the LSP server backend ("/lsp/settings-sync/initialization_options" json path) - Commands: - `load` @@ -48,7 +48,7 @@ On any command that requires interaction with Github: - load them from the Gist and store under the user settings dir (Zed's `paths` crate) - if the file being loaded exists, ask a confirmation to overwrite it - `-f/--force` option to overwrite without any confirmation - - if a file is `settings.json` file, then overwrite "/lsp/settings_sync/initialization_options/github_token" JSON path in it with the current value of this node from the config file + - if a file is `settings.json` file, then overwrite "/lsp/settings-sync/initialization_options/github_token" JSON path in it with the current value of this node from the config file - `help` - help message generated by Clap diff --git a/README.md b/README.md index dbc9df1..002797b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Until then, you can use the [dev installation mode](#dev-extension-installation) ```jsonc { "lsp": { - "settings_sync": { + "settings-sync": { "initialization_options": { "github_token": "gho_my-shiny-token", "gist_id": "deadbeefdeadbeefdeadbeefdeadbeef" @@ -83,7 +83,7 @@ Another approach could be swapping the keymap entries for zed: open setting ## Troubleshooting -- Open LSP logs (dev: open language server logs), find `settings_sync` LSP server instance running for the specific settings file, and inspect its log +- Open LSP logs (dev: open language server logs), find `settings-sync` LSP server instance running for the specific settings file, and inspect its log - File an [issue](https://github.com/vittorius/zed-settings-sync/issues/new) on Github ## Development diff --git a/common/src/config.rs b/common/src/config.rs index 608a131..842c127 100644 --- a/common/src/config.rs +++ b/common/src/config.rs @@ -48,9 +48,9 @@ impl Config { .ok_or(anyhow!("Settings file is empty"))?; let config = from_value( zed_settings - .pointer("/lsp/settings_sync/initialization_options") // TODO: make this pointer key shared among crates of this package + .pointer("/lsp/settings-sync/initialization_options") // TODO: make this pointer key shared among crates of this package .ok_or(anyhow!( - "Missing lsp.settings_sync.initialization_options key in settings tree" + "Missing lsp.settings-sync.initialization_options key in settings tree" ))? .clone(), )?; @@ -144,7 +144,7 @@ mod tests { r#" { "lsp": { - "settings_sync": { + "settings-sync": { "initialization_options": { "github_token": "your_github_token", "gist_id": "your_gist_id" @@ -195,7 +195,7 @@ mod tests { assert_eq!( config.unwrap_err().to_string(), - "Missing lsp.settings_sync.initialization_options key in settings tree" + "Missing lsp.settings-sync.initialization_options key in settings tree" ); Ok(()) @@ -209,7 +209,7 @@ mod tests { assert_eq!( config.unwrap_err().to_string(), - "Missing lsp.settings_sync.initialization_options key in settings tree" + "Missing lsp.settings-sync.initialization_options key in settings tree" ); Ok(()) @@ -222,7 +222,7 @@ mod tests { r#" { "lsp": { - "settings_sync": {} + "settings-sync": {} } }"#, )?; @@ -231,7 +231,7 @@ mod tests { assert_eq!( config.unwrap_err().to_string(), - "Missing lsp.settings_sync.initialization_options key in settings tree" + "Missing lsp.settings-sync.initialization_options key in settings tree" ); Ok(()) @@ -243,7 +243,7 @@ mod tests { r#" { "lsp": { - "settings_sync": { + "settings-sync": { "initialization_options": {} } } @@ -263,7 +263,7 @@ mod tests { r#" { "lsp": { - "settings_sync": { + "settings-sync": { "initialization_options": { "gist_id": "1234567890abcdef" } diff --git a/common/src/sync/client/github_client.rs b/common/src/sync/client/github_client.rs index cd7f4b8..adec351 100644 --- a/common/src/sync/client/github_client.rs +++ b/common/src/sync/client/github_client.rs @@ -144,13 +144,13 @@ fn set_github_token_config_value(root: &CstRootNode, value: String) -> Result<() .ok_or(Error::InvalidConfig( r#"Missing "lsp" configuration object"#.to_string(), ))? - .get("settings_sync") + .get("settings-sync") .ok_or(Error::InvalidConfig( - r#"Missing "settings_sync" key"#.to_string(), + r#"Missing "settings-sync" key"#.to_string(), ))? .object_value() .ok_or(Error::InvalidConfig( - r#"Missing "settings_sync" configuration object"#.to_string(), + r#"Missing "settings-sync" configuration object"#.to_string(), ))? .get("initialization_options") .ok_or(Error::InvalidConfig( From 0e89f4d54fe8f7e087bae0789ee2c062fcb3550e Mon Sep 17 00:00:00 2001 From: Viktor Zahorodnii Date: Tue, 20 Jan 2026 21:34:20 +0200 Subject: [PATCH 4/4] Bump version of binaries and ext to 0.0.1-alpha.6 --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- cli/Cargo.toml | 2 +- extension.toml | 2 +- lsp/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e05cc30..cbb1c8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4135,14 +4135,14 @@ dependencies = [ [[package]] name = "zed-settings-sync" -version = "0.0.1-alpha.5" +version = "0.0.1-alpha.6" dependencies = [ "zed_extension_api", ] [[package]] name = "zed-settings-sync-cli" -version = "0.0.1-alpha.5" +version = "0.0.1-alpha.6" dependencies = [ "anyhow", "assert_fs", @@ -4160,7 +4160,7 @@ dependencies = [ [[package]] name = "zed-settings-sync-lsp" -version = "0.0.1-alpha.5" +version = "0.0.1-alpha.6" dependencies = [ "anyhow", "assert_fs", diff --git a/Cargo.toml b/Cargo.toml index d681748..069b316 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zed-settings-sync" description = "A Zed editor extension for syncing settings files to a remote storage (currently, GitHub)" -version = "0.0.1-alpha.5" +version = "0.0.1-alpha.6" edition = "2024" license-file = "LICENSE.txt" repository = "https://github.com/vittorius/zed-settings-sync" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index a2cb7d7..165cf4d 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.0.1-alpha.5" +version = "0.0.1-alpha.6" edition = "2024" [lints] diff --git a/extension.toml b/extension.toml index a8a3e81..a24d3c9 100644 --- a/extension.toml +++ b/extension.toml @@ -1,6 +1,6 @@ id = "settings-sync" name = "Settings Sync" -version = "0.0.1-alpha.5" +version = "0.0.1-alpha.6" 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 672efbd..96920f0 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.0.1-alpha.5" +version = "0.0.1-alpha.6" edition = "2024" [lints]