aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src/types.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-03 07:09:28 +0000
committerBlaž Hrastnik2021-12-03 07:09:28 +0000
commit5545f8ebb5585c59981f1d09add9bd747b143ba2 (patch)
treedb578c043c15eaa33cb2382af2e7d41c05f17395 /helix-dap/src/types.rs
parentbcf70d8e67ff0473e3723ec4f7bb33305e824407 (diff)
dap: Add RunInTerminal reverse request, support replying to requests
Diffstat (limited to 'helix-dap/src/types.rs')
-rw-r--r--helix-dap/src/types.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs
index 453fa558..3f61ba07 100644
--- a/helix-dap/src/types.rs
+++ b/helix-dap/src/types.rs
@@ -1,5 +1,6 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;
+use std::collections::HashMap;
use std::path::PathBuf;
#[derive(
@@ -541,6 +542,34 @@ pub mod requests {
type Result = SetExceptionBreakpointsResponse;
const COMMAND: &'static str = "setExceptionBreakpoints";
}
+
+ // Reverse Requests
+
+ #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+ #[serde(rename_all = "camelCase")]
+ pub struct RunInTerminalResponse {
+ pub process_id: Option<usize>,
+ pub shell_process_id: Option<usize>,
+ }
+
+ #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+ #[serde(rename_all = "camelCase")]
+ pub struct RunInTerminalArguments {
+ pub kind: Option<String>,
+ pub title: Option<String>,
+ pub cwd: String,
+ pub args: Vec<String>,
+ pub env: Option<HashMap<String, Option<String>>>,
+ }
+
+ #[derive(Debug)]
+ pub enum RunInTerminal {}
+
+ impl Request for RunInTerminal {
+ type Arguments = RunInTerminalArguments;
+ type Result = RunInTerminalResponse;
+ const COMMAND: &'static str = "runInTerminal";
+ }
}
// Events