diff --git a/helix-dap/examples/dap-basic.rs b/helix-dap/examples/dap-basic.rs index eef64be3..de8c2e02 100644 --- a/helix-dap/examples/dap-basic.rs +++ b/helix-dap/examples/dap-basic.rs @@ -41,7 +41,7 @@ pub async fn main() -> Result<()> { tokio::spawn(output(output_event)); println!("init: {:?}", client.initialize("go".to_owned()).await); - println!("caps: {:#?}", client.capabilities()); + println!("caps: {:?}", client.capabilities()); let args = LaunchArguments { mode: "exec".to_owned(), diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index 23faffd2..23cdefbd 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -20,16 +20,77 @@ use tokio::{ }, }; +#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ColumnDescriptor { + pub attribute_name: String, + pub label: String, + pub format: Option, + #[serde(rename = "type")] + pub col_type: Option, + pub width: Option, +} + +#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ExceptionBreakpointsFilter { + pub filter: String, + pub label: String, + pub description: Option, + pub default: Option, + pub supports_condition: Option, + pub condition_description: Option, +} + #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DebuggerCapabilities { pub supports_configuration_done_request: Option, pub supports_function_breakpoints: Option, pub supports_conditional_breakpoints: Option, + pub supports_hit_conditional_breakpoints: Option, + pub supports_evaluate_for_hovers: Option, + pub supports_step_back: Option, + pub supports_set_variable: Option, + pub supports_restart_frame: Option, + pub supports_goto_targets_request: Option, + pub supports_step_in_targets_request: Option, + pub supports_completions_request: Option, + pub supports_modules_request: Option, + pub supports_restart_request: Option, + pub supports_exception_options: Option, + pub supports_value_formatting_options: Option, pub supports_exception_info_request: Option, pub support_terminate_debuggee: Option, + pub support_suspend_debuggee: Option, pub supports_delayed_stack_trace_loading: Option, - // TODO: complete this + pub supports_loaded_sources_request: Option, + pub supports_log_points: Option, + pub supports_terminate_threads_request: Option, + pub supports_set_expression: Option, + pub supports_terminate_request: Option, + pub supports_data_breakpoints: Option, + pub supports_read_memory_request: Option, + pub supports_write_memory_request: Option, + pub supports_disassemble_request: Option, + pub supports_cancel_request: Option, + pub supports_breakpoint_locations_request: Option, + pub supports_clipboard_context: Option, + pub supports_stepping_granularity: Option, + pub supports_instruction_breakpoints: Option, + pub supports_exception_filter_options: Option, + pub exception_breakpoint_filters: Option>, + pub completion_trigger_characters: Option>, + pub additional_module_columns: Option>, + pub supported_checksum_algorithms: Option>, +} + +impl std::ops::Deref for DebuggerCapabilities { + type Target = Option; + + fn deref(&self) -> &Self::Target { + &self.supports_exception_options + } } #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]