Dispatch DocumentDidOpen on ls initialization

This commit is contained in:
Sofus Addington 2024-08-18 21:44:22 +02:00
parent 44c54531a4
commit dcfceb5059
2 changed files with 3 additions and 1 deletions

View file

@ -734,6 +734,8 @@ impl Application {
doc.text(),
language_id,
));
helix_event::dispatch(helix_view::events::DocumentDidOpen { doc });
}
}
Notification::PublishDiagnostics(params) => {

View file

@ -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 }
}