Load workspace and editor key bindings from a JSON file

This commit is contained in:
Max Brunsfeld 2022-04-08 17:32:58 -07:00
parent fd4b81c8fc
commit 3636c9ec25
12 changed files with 326 additions and 293 deletions

View file

@ -2419,7 +2419,7 @@ mod tests {
.condition(&cx_b, |editor, _| editor.context_menu_visible())
.await;
editor_b.update(cx_b, |editor, cx| {
editor.confirm_completion(&ConfirmCompletion(Some(0)), cx);
editor.confirm_completion(&ConfirmCompletion { item_ix: Some(0) }, cx);
assert_eq!(editor.text(cx), "fn main() { a.first_method() }");
});
@ -3608,7 +3608,12 @@ mod tests {
// Toggle code actions and wait for them to display.
editor_b.update(cx_b, |editor, cx| {
editor.toggle_code_actions(&ToggleCodeActions(false), cx);
editor.toggle_code_actions(
&ToggleCodeActions {
deployed_from_indicator: false,
},
cx,
);
});
editor_b
.condition(&cx_b, |editor, _| editor.context_menu_visible())
@ -3619,7 +3624,7 @@ mod tests {
// Confirming the code action will trigger a resolve request.
let confirm_action = workspace_b
.update(cx_b, |workspace, cx| {
Editor::confirm_code_action(workspace, &ConfirmCodeAction(Some(0)), cx)
Editor::confirm_code_action(workspace, &ConfirmCodeAction { item_ix: Some(0) }, cx)
})
.unwrap();
fake_language_server.handle_request::<lsp::request::CodeActionResolveRequest, _, _>(