Cursor settings import (#31424)

Closes #ISSUE

Release Notes:

- Added support for importing settings from cursor. Cursor settings can
be imported using the `zed: import cursor settings` command from the
command palette
This commit is contained in:
Ben Kunkle 2025-05-27 13:14:25 -05:00 committed by GitHub
parent 21bd91a773
commit b9a5d437db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 147 additions and 48 deletions

View file

@ -439,3 +439,18 @@ pub fn vscode_settings_file() -> &'static PathBuf {
}
})
}
/// Returns the path to the cursor user settings file
pub fn cursor_settings_file() -> &'static PathBuf {
static LOGS_DIR: OnceLock<PathBuf> = OnceLock::new();
let rel_path = "Cursor/User/settings.json";
LOGS_DIR.get_or_init(|| {
if cfg!(target_os = "macos") {
home_dir()
.join("Library/Application Support")
.join(rel_path)
} else {
config_dir().join(rel_path)
}
})
}