diff options
author | Blaž Hrastnik | 2021-08-16 09:16:06 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-08-20 04:48:32 +0000 |
commit | d39baa3b4e1f5bc1a03533e7b22af0043ec1eac9 (patch) | |
tree | 11f769898442e5d4fbddb8aacf2b7ff05fb33cb5 /helix-view/src | |
parent | 0300dbdeb378fa5797a23ce8b3f72e2749c3ce50 (diff) |
Start integrating into the editor's event loop
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/document.rs | 2 | ||||
-rw-r--r-- | helix-view/src/editor.rs | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index ff0c8bf4..3e8ed21c 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -100,6 +100,7 @@ pub struct Document { diagnostics: Vec<Diagnostic>, language_server: Option<Arc<helix_lsp::Client>>, + pub debugger: Option<helix_dap::Client>, } use std::fmt; @@ -425,6 +426,7 @@ impl Document { history: Cell::new(History::default()), last_saved_revision: 0, language_server: None, + debugger: None, line_ending: DEFAULT_LINE_ENDING, } } diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index ec80580e..7b9f34fc 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -7,6 +7,9 @@ use crate::{ }; use futures_util::future; +use futures_util::stream::select_all::SelectAll; +use tokio_stream::wrappers::UnboundedReceiverStream; + use std::{ path::{Path, PathBuf}, sync::Arc, @@ -70,6 +73,7 @@ pub struct Editor { pub registers: Registers, pub theme: Theme, pub language_servers: helix_lsp::Registry, + pub debuggers: SelectAll<UnboundedReceiverStream<(usize, helix_dap::Payload)>>, pub clipboard_provider: Box<dyn ClipboardProvider>, pub syn_loader: Arc<syntax::Loader>, @@ -107,6 +111,7 @@ impl Editor { selected_register: RegisterSelection::default(), theme: themes.default(), language_servers, + debuggers: SelectAll::new(), syn_loader: config_loader, theme_loader: themes, registers: Registers::default(), |