diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 19b24a2f..feb84fb6 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -1048,7 +1048,6 @@ impl Application { let result = self.handle_show_document(params, offset_encoding); Ok(json!(result)) } - Ok(MethodCall::WorkspaceDiagnosticRefresh) => { for document in self.editor.documents() { let language_server = language_server!(); diff --git a/helix-term/src/events.rs b/helix-term/src/events.rs index 44c80124..9d06627c 100644 --- a/helix-term/src/events.rs +++ b/helix-term/src/events.rs @@ -1,7 +1,7 @@ use helix_event::{events, register_event}; use helix_view::document::Mode; use helix_view::events::{ - DiagnosticsDidChange, DocumentDidChange, DocumentDidOpen, SelectionDidChange, DocumentFocusLost, + DiagnosticsDidChange, DocumentDidChange, DocumentDidOpen, DocumentFocusLost, SelectionDidChange, }; use crate::commands; diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index d2dcb05a..ecac8f23 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -4,8 +4,7 @@ use crate::{ document::{ DocumentOpenError, DocumentSavedEventFuture, DocumentSavedEventResult, Mode, SavePoint, }, - events::DocumentDidOpen, - events::DocumentFocusLost, + events::{DocumentDidOpen, DocumentFocusLost}, graphics::{CursorKind, Rect}, handlers::Handlers, info::Info, diff --git a/helix-view/src/events.rs b/helix-view/src/events.rs index e91f2eda..cb3ed90c 100644 --- a/helix-view/src/events.rs +++ b/helix-view/src/events.rs @@ -4,9 +4,6 @@ use helix_event::events; use crate::{Document, DocumentId, Editor, ViewId}; events! { - // DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope } - DocumentDidOpen<'a> { doc: &'a Document} - // DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope } DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, @@ -14,6 +11,7 @@ events! { changes: &'a ChangeSet, ghost_transaction: bool } + DocumentDidOpen<'a> { doc: &'a Document} SelectionDidChange<'a> { doc: &'a mut Document, view: ViewId } DiagnosticsDidChange<'a> { editor: &'a mut Editor, doc: DocumentId } // called **after** a document loses focus (but not when its closed)