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:
parent
21bd91a773
commit
b9a5d437db
6 changed files with 147 additions and 48 deletions
|
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue