@@ -1458,11 +1458,11 @@ fn global_search(cx: &mut Context) {
14581458 relative_path.into()
14591459 }
14601460 },
1461− move |editor: &mut Editor, (line_num, path), action| {
1462− match editor.open(path.into(), action) {
1461+ move |cx, (line_num, path), action| {
1462+ match cx.editor.open(path.into(), action) {
14631463 Ok(_) => {}
14641464 Err(e) => {
1465− editor.set_error(format!(
1465+ cx.editor.set_error(format!(
14661466 "Failed to open file '{}': {}",
14671467 path.display(),
14681468 e
@@ -1472,7 +1472,7 @@ fn global_search(cx: &mut Context) {
14721472 }
14731473
14741474 let line_num = *line_num;
1475− let (view, doc) = current!(editor);
1475+ let (view, doc) = current!(cx.editor);
14761476 let text = doc.text();
14771477 let start = text.line_to_char(line_num);
14781478 let end = text.line_to_char((line_num + 1).min(text.len_lines()));
@@ -2717,8 +2717,8 @@ fn buffer_picker(cx: &mut Context) {
27172717 None => "[scratch buffer]".into(),
27182718 }
27192719 },
2720− |editor: &mut Editor, (id, _path): &(DocumentId, Option<PathBuf>), _action| {
2721− editor.switch(*id, Action::Replace);
2720+ |cx, (id, _path): &(DocumentId, Option<PathBuf>), _action| {
2721+ cx.editor.switch(*id, Action::Replace);
27222722 },
27232723 |editor, (id, path)| {
27242724 let doc = &editor.documents.get(id)?;
@@ -2785,9 +2785,9 @@ fn symbol_picker(cx: &mut Context) {
27852785 let picker = FilePicker::new(
27862786 symbols,
27872787 |symbol| (&symbol.name).into(),
2788− move |editor: &mut Editor, symbol, _action| {
2789− push_jump(editor);
2790− let (view, doc) = current!(editor);
2788+ move |cx, symbol, _action| {
2789+ push_jump(cx.editor);
2790+ let (view, doc) = current!(cx.editor);
27912791
27922792 if let Some(range) =
27932793 lsp_range_to_range(doc.text(), symbol.location.range, offset_encoding)
@@ -2845,15 +2845,15 @@ pub fn code_action(cx: &mut Context) {
28452845 }
28462846 lsp::CodeActionOrCommand::Command(command) => command.title.as_str().into(),
28472847 },
2848− move |editor, code_action, _action| match code_action {
2848+ move |cx, code_action, _action| match code_action {
28492849 lsp::CodeActionOrCommand::Command(command) => {
28502850 log::debug!("code action command: {:?}", command);
2851− editor.set_error(String::from("Handling code action command is not implemented yet, see https://github.com/helix-editor/helix/issues/183"));
2851+ cx.editor.set_error(String::from("Handling code action command is not implemented yet, see https://github.com/helix-editor/helix/issues/183"));
28522852 }
28532853 lsp::CodeActionOrCommand::CodeAction(code_action) => {
28542854 log::debug!("code action: {:?}", code_action);
28552855 if let Some(ref workspace_edit) = code_action.edit {
2856− apply_workspace_edit(editor, offset_encoding, workspace_edit)
2856+ apply_workspace_edit(cx.editor, offset_encoding, workspace_edit)
28572857 }
28582858 }
28592859 },
@@ -3267,9 +3267,7 @@ fn goto_impl(
32673267 let line = location.range.start.line;
32683268 format!("{}:{}", file, line).into()
32693269 },
3270− move |editor: &mut Editor, location, action| {
3271− jump_to(editor, location, offset_encoding, action)
3272− },
3270+ move |cx, location, action| jump_to(cx.editor, location, offset_encoding, action),
32733271 |_editor, location| {
32743272 let path = location.uri.to_file_path().unwrap();
32753273 let line = Some((