aboutsummaryrefslogtreecommitdiff
path: root/helix-dap
diff options
context:
space:
mode:
Diffstat (limited to 'helix-dap')
-rw-r--r--helix-dap/src/client.rs4
-rw-r--r--helix-dap/src/types.rs11
2 files changed, 13 insertions, 2 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index ed4f8ed5..43afc4c6 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -225,7 +225,9 @@ impl Client {
}
pub fn capabilities(&self) -> &DebuggerCapabilities {
- self.caps.as_ref().expect("debugger not yet initialized!")
+ self.caps
+ .as_ref()
+ .expect("debugger not yet initialized!")
}
pub async fn initialize(&mut self, adapter_id: String) -> Result<()> {
diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs
index 390fa7f3..e8543dcb 100644
--- a/helix-dap/src/types.rs
+++ b/helix-dap/src/types.rs
@@ -1,6 +1,14 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;
-use std::path::PathBuf;
+use std::{collections::HashMap, path::PathBuf};
+
+#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "kebab-case")]
+pub struct DebugTemplate {
+ pub name: String,
+ pub request: String,
+ pub args: HashMap<String, Value>
+}
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
@@ -10,6 +18,7 @@ pub struct DebugAdapterConfig {
pub command: String,
pub args: Vec<String>,
pub port_arg: Option<String>,
+ pub templates: Vec<DebugTemplate>,
}
pub trait Request {