Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/events.rs')
-rw-r--r--helix-view/src/events.rs41
1 files changed, 3 insertions, 38 deletions
diff --git a/helix-view/src/events.rs b/helix-view/src/events.rs
index 0435e6a4..8b789cc0 100644
--- a/helix-view/src/events.rs
+++ b/helix-view/src/events.rs
@@ -1,44 +1,9 @@
-use helix_core::{ChangeSet, Rope};
+use helix_core::Rope;
use helix_event::events;
-use helix_lsp::LanguageServerId;
-use crate::{editor::Config, Document, DocumentId, Editor, ViewId};
+use crate::{Document, ViewId};
events! {
- DocumentDidOpen<'a> {
- editor: &'a mut Editor,
- doc: DocumentId
- }
- DocumentDidChange<'a> {
- doc: &'a mut Document,
- view: ViewId,
- old_text: &'a Rope,
- changes: &'a ChangeSet,
- ghost_transaction: bool
- }
- DocumentDidClose<'a> {
- editor: &'a mut Editor,
- doc: Document
- }
+ DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope }
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)
- DocumentFocusLost<'a> { editor: &'a mut Editor, doc: DocumentId }
-
- LanguageServerInitialized<'a> {
- editor: &'a mut Editor,
- server_id: LanguageServerId
- }
- LanguageServerExited<'a> {
- editor: &'a mut Editor,
- server_id: LanguageServerId
- }
-
- // NOTE: this event is simple for now and is expected to change as the config system evolves.
- // Ideally it would say what changed.
- ConfigDidChange<'a> {
- editor: &'a mut Editor,
- old: &'a Config,
- new: &'a Config
- }
}