diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 646a3397b..80f94d130 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -734,6 +734,8 @@ impl Application { doc.text(), language_id, )); + + helix_event::dispatch(helix_view::events::DocumentDidOpen { doc }); } } Notification::PublishDiagnostics(params) => { diff --git a/helix-view/src/events.rs b/helix-view/src/events.rs index 0d4b1c21c..3c1cd1c97 100644 --- a/helix-view/src/events.rs +++ b/helix-view/src/events.rs @@ -5,7 +5,7 @@ use crate::{Document, DocumentId, Editor, ViewId}; events! { DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope } - DocumentDidOpen<'a> { doc: &'a mut Document} + DocumentDidOpen<'a> { doc: &'a Document} SelectionDidChange<'a> { doc: &'a mut Document, view: ViewId } DiagnosticsDidChange<'a> { editor: &'a mut Editor, doc: DocumentId } }