summaryrefslogtreecommitdiff
path: root/helix-dap/src
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-14 06:14:05 +0000
committerBlaž Hrastnik2021-08-20 04:43:54 +0000
commit09390be6a568bcf7052c57bf10219c448413d5b0 (patch)
treedba12ddc1f7010e62e3729f8c50e5f000bea38d7 /helix-dap/src
parentc72475bc3084f206c3d0c612dd86afe324c6931e (diff)
dap-basic: handle output events
Diffstat (limited to 'helix-dap/src')
-rw-r--r--helix-dap/src/client.rs13
-rw-r--r--helix-dap/src/lib.rs2
2 files changed, 14 insertions, 1 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 7ce7833d..ef7bb153 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -254,6 +254,19 @@ struct VariablesResponseBody {
variables: Vec<Variable>,
}
+#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct OutputEventBody {
+ pub output: String,
+ pub category: Option<String>,
+ pub group: Option<String>,
+ pub line: Option<usize>,
+ pub column: Option<usize>,
+ pub variables_reference: Option<usize>,
+ pub source: Option<Source>,
+ pub data: Option<Value>,
+}
+
#[derive(Debug)]
pub struct Client {
id: usize,
diff --git a/helix-dap/src/lib.rs b/helix-dap/src/lib.rs
index 1e545fd8..408f4d3d 100644
--- a/helix-dap/src/lib.rs
+++ b/helix-dap/src/lib.rs
@@ -1,7 +1,7 @@
mod client;
mod transport;
-pub use client::{Breakpoint, Client, SourceBreakpoint};
+pub use client::{Breakpoint, Client, OutputEventBody, SourceBreakpoint};
pub use transport::{Event, Payload, Request, Response, Transport};
use thiserror::Error;