aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.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-term/src/application.rs
parentbcf70d8e67ff0473e3723ec4f7bb33305e824407 (diff)
dap: Add RunInTerminal reverse request, support replying to requests
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 522c4b73..8dd5f47a 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -1,5 +1,5 @@
use helix_core::{merge_toml_values, syntax};
-use helix_dap::Payload;
+use helix_dap::{self as dap, Payload, Request};
use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
use helix_view::{editor::Breakpoint, theme, Editor};
@@ -468,7 +468,16 @@ impl Application {
}
}
Payload::Response(_) => unreachable!(),
- Payload::Request(request) => unimplemented!("{:?}", request),
+ Payload::Request(request) => match request.command.as_str() {
+ dap::requests::RunInTerminal::COMMAND => {
+ let arguments: dap::requests::RunInTerminalArguments =
+ serde_json::from_value(request.arguments.unwrap_or_default()).unwrap();
+ // TODO: no unwrap
+
+ // TODO: dap reply
+ }
+ _ => log::error!("DAP reverse request not implemented: {:?}", request),
+ },
}
self.render();
}