@@ -852,7 +852,7 @@ pub fn exit_select_mode(cx: &mut Context) {
852852 cx.doc().mode = Mode::Normal;
853853}
854854
855−fn goto(cx: &'static mut Context<'static>, locations: Vec<lsp::Location>) {
855+fn goto(cx: &mut Context, locations: Vec<lsp::Location>) {
856856 let doc = cx.doc();
857857
858858 doc.mode = Mode::Normal;
@@ -878,8 +878,9 @@ fn goto(cx: &'static mut Context<'static>, locations: Vec<lsp::Location>) {
878878 format!("{}:{}", file, line).into()
879879 },
880880 move |editor: &mut Editor, item| {
881− cx.editor.open(PathBuf::from(item.uri.path()), cx.executor);
882− let doc = cx.doc();
881+ let executor = smol::Executor::new();
882+ editor.open(PathBuf::from(item.uri.path()), &executor);
883+ let mut doc = &mut editor.view_mut().doc;
883884 let definition_pos = item.range.start;
884885 let new_pos =
885886 helix_lsp::util::lsp_pos_to_pos(doc.text().slice(..), definition_pos);
@@ -891,7 +892,7 @@ fn goto(cx: &'static mut Context<'static>, locations: Vec<lsp::Location>) {
891892 }
892893}
893894
894−pub fn goto_definition(cx: &'static mut Context<'static>) {
895+pub fn goto_definition(cx: &mut Context) {
895896 let doc = cx.doc();
896897 let language_server = match doc.language_server.as_ref() {
897898 Some(language_server) => language_server,
@@ -907,7 +908,7 @@ pub fn goto_definition(cx: &'static mut Context<'static>) {
907908 goto(cx, res);
908909}
909910
910−pub fn goto_type_definition(cx: &'static mut Context<'static>) {
911+pub fn goto_type_definition(cx: &mut Context) {
911912 let doc = cx.doc();
912913 let language_server = match doc.language_server.as_ref() {
913914 Some(language_server) => language_server,
@@ -923,7 +924,7 @@ pub fn goto_type_definition(cx: &'static mut Context<'static>) {
923924 goto(cx, res);
924925}
925926
926−pub fn goto_implementation(cx: &'static mut Context<'static>) {
927+pub fn goto_implementation(cx: &mut Context) {
927928 let doc = cx.doc();
928929 let language_server = match doc.language_server.as_ref() {
929930 Some(language_server) => language_server,
@@ -939,7 +940,7 @@ pub fn goto_implementation(cx: &'static mut Context<'static>) {
939940 goto(cx, res);
940941}
941942
942−pub fn goto_reference(cx: &'static mut Context<'static>) {
943+pub fn goto_reference(cx: &mut Context) {
943944 let doc = cx.doc();
944945 let language_server = match doc.language_server.as_ref() {
945946 Some(language_server) => language_server,