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
|
@ -1493,8 +1493,27 @@ impl settings::Settings for AllLanguageSettings {
|
|||
associations.entry(v.into()).or_default().push(k.clone());
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: do we want to merge imported globs per filetype? for now we'll just replace
|
||||
current.file_types.extend(associations);
|
||||
|
||||
// cursor global ignore list applies to cursor-tab, so transfer it to edit_predictions.disabled_globs
|
||||
if let Some(disabled_globs) = vscode
|
||||
.read_value("cursor.general.globalCursorIgnoreList")
|
||||
.and_then(|v| v.as_array())
|
||||
{
|
||||
current
|
||||
.edit_predictions
|
||||
.get_or_insert_default()
|
||||
.disabled_globs
|
||||
.get_or_insert_default()
|
||||
.extend(
|
||||
disabled_globs
|
||||
.iter()
|
||||
.filter_map(|glob| glob.as_str())
|
||||
.map(|s| s.to_string()),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue