Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/handlers/completion.rs')
-rw-r--r--helix-view/src/handlers/completion.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/helix-view/src/handlers/completion.rs b/helix-view/src/handlers/completion.rs
new file mode 100644
index 00000000..27ca1d71
--- /dev/null
+++ b/helix-view/src/handlers/completion.rs
@@ -0,0 +1,27 @@
+use crate::{DocumentId, ViewId};
+
+pub enum CompletionEvent {
+ /// Auto completion was triggered by typing a word char
+ AutoTrigger {
+ cursor: usize,
+ doc: DocumentId,
+ view: ViewId,
+ },
+ /// Auto completion was triggered by typing a trigger char
+ /// specified by the LSP
+ TriggerChar {
+ cursor: usize,
+ doc: DocumentId,
+ view: ViewId,
+ },
+ /// A completion was manually requested (c-x)
+ ManualTrigger {
+ cursor: usize,
+ doc: DocumentId,
+ view: ViewId,
+ },
+ /// Some text was deleted and the cursor is now at `pos`
+ DeleteText { cursor: usize },
+ /// Invalidate the current auto completion trigger
+ Cancel,
+}