diff options
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/Cargo.toml | 2 | ||||
-rw-r--r-- | helix-view/src/editor.rs | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index c0a39700..1f55a36b 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -18,6 +18,7 @@ bitflags = "1.3" anyhow = "1" helix-core = { version = "0.4", path = "../helix-core" } helix-lsp = { version = "0.4", path = "../helix-lsp"} +helix-dap = { version = "0.4", path = "../helix-dap"} crossterm = { version = "0.21", optional = true } # Conversion traits @@ -25,6 +26,7 @@ once_cell = "1.8" url = "2" tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot"] } +tokio-stream = "0.1" futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false } slotmap = "1" diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index e5ff93ad..f87ae318 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, @@ -19,7 +22,7 @@ use anyhow::Error; pub use helix_core::diagnostic::Severity; pub use helix_core::register::Registers; -use helix_core::syntax; +use helix_core::syntax::{self, DebugConfigCompletion}; use helix_core::Position; use serde::Deserialize; @@ -77,6 +80,14 @@ pub struct Editor { pub registers: Registers, pub theme: Theme, pub language_servers: helix_lsp::Registry, + + pub debugger: Option<helix_dap::Client>, + pub debugger_events: SelectAll<UnboundedReceiverStream<helix_dap::Payload>>, + pub debug_config_picker: Option<Vec<String>>, + pub debug_config_completions: Option<Vec<Vec<DebugConfigCompletion>>>, + pub variables: Option<Vec<String>>, + pub variables_page: usize, + pub clipboard_provider: Box<dyn ClipboardProvider>, pub syn_loader: Arc<syntax::Loader>, @@ -114,6 +125,12 @@ impl Editor { selected_register: RegisterSelection::default(), theme: themes.default(), language_servers, + debugger: None, + debugger_events: SelectAll::new(), + debug_config_picker: None, + debug_config_completions: None, + variables: None, + variables_page: 0, syn_loader: config_loader, theme_loader: themes, registers: Registers::default(), |