settings_ui: Remove OpenSettingsAt from command palette (#41358)
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
co-authored by
Conrad Irwin
parent
0e45500158
commit
7a7e820030
@@ -4562,74 +4562,6 @@ mod tests {
|
||||
});
|
||||
}
|
||||
|
||||
/// Actions that don't build from empty input won't work from command palette invocation.
|
||||
#[gpui::test]
|
||||
async fn test_actions_build_with_empty_input(cx: &mut gpui::TestAppContext) {
|
||||
init_keymap_test(cx);
|
||||
cx.update(|cx| {
|
||||
let all_actions = cx.all_action_names();
|
||||
let mut failing_names = Vec::new();
|
||||
let mut errors = Vec::new();
|
||||
for action in all_actions {
|
||||
match action.to_string().as_str() {
|
||||
"vim::FindCommand"
|
||||
| "vim::Literal"
|
||||
| "vim::ResizePane"
|
||||
| "vim::PushObject"
|
||||
| "vim::PushFindForward"
|
||||
| "vim::PushFindBackward"
|
||||
| "vim::PushSneak"
|
||||
| "vim::PushSneakBackward"
|
||||
| "vim::PushChangeSurrounds"
|
||||
| "vim::PushJump"
|
||||
| "vim::PushDigraph"
|
||||
| "vim::PushLiteral"
|
||||
| "vim::PushHelixNext"
|
||||
| "vim::PushHelixPrevious"
|
||||
| "vim::Number"
|
||||
| "vim::SelectRegister"
|
||||
| "git::StageAndNext"
|
||||
| "git::UnstageAndNext"
|
||||
| "terminal::SendText"
|
||||
| "terminal::SendKeystroke"
|
||||
| "app_menu::OpenApplicationMenu"
|
||||
| "picker::ConfirmInput"
|
||||
| "editor::HandleInput"
|
||||
| "editor::FoldAtLevel"
|
||||
| "pane::ActivateItem"
|
||||
| "workspace::ActivatePane"
|
||||
| "workspace::MoveItemToPane"
|
||||
| "workspace::MoveItemToPaneInDirection"
|
||||
| "workspace::NewFileSplit"
|
||||
| "workspace::OpenTerminal"
|
||||
| "workspace::SendKeystrokes"
|
||||
| "agent::NewNativeAgentThreadFromSummary"
|
||||
| "action::Sequence"
|
||||
| "zed::OpenBrowser"
|
||||
| "zed::OpenZedUrl"
|
||||
| "settings_editor::FocusFile" => {}
|
||||
_ => {
|
||||
let result = cx.build_action(action, None);
|
||||
match &result {
|
||||
Ok(_) => {}
|
||||
Err(err) => {
|
||||
failing_names.push(action);
|
||||
errors.push(format!("{action} failed to build: {err:?}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if !errors.is_empty() {
|
||||
panic!(
|
||||
"Failed to build actions using {{}} as input: {:?}. Errors:\n{}",
|
||||
failing_names,
|
||||
errors.join("\n")
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// Checks that action namespaces are the expected set. The purpose of this is to prevent typos
|
||||
/// and let you know when introducing a new namespace.
|
||||
#[gpui::test]
|
||||
|
||||
@@ -116,12 +116,11 @@ pub struct IncreaseBufferFontSize {
|
||||
}
|
||||
|
||||
/// Increases the font size in the editor buffer.
|
||||
#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
|
||||
#[derive(PartialEq, Clone, Debug, Deserialize, JsonSchema, Action)]
|
||||
#[action(namespace = zed)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct OpenSettingsAt {
|
||||
/// A path to a specific setting (e.g. `theme.mode`)
|
||||
#[serde(default)]
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user