From 5545f8ebb5585c59981f1d09add9bd747b143ba2 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 3 Dec 2021 16:09:28 +0900 Subject: dap: Add RunInTerminal reverse request, support replying to requests --- helix-term/src/application.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'helix-term/src') 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(); } -- cgit v1.2.3-70-g09d2