aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-14 08:01:23 +0000
committerBlaž Hrastnik2021-08-20 04:43:54 +0000
commitcc650c7f4f7e63d9417ceb3a0f302a575297dd98 (patch)
tree302dfa3c9d703d2dd8b6e208e2f9546bf7cbb952
parentb3be6b269aaf8b81d74ca4f0001254d8a17a6c76 (diff)
types: capitalize ID in names
Part of LLDB integration
-rw-r--r--helix-dap/src/client.rs50
1 files changed, 26 insertions, 24 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index a12238ae..a2b8a4e3 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -35,21 +35,23 @@ pub struct DebuggerCapabilities {
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
struct InitializeArguments {
- client_id: String,
- client_name: String,
+ #[serde(rename = "clientID")]
+ client_id: Option<String>,
+ client_name: Option<String>,
+ #[serde(rename = "adapterID")]
adapter_id: String,
- locale: String,
+ locale: Option<String>,
#[serde(rename = "linesStartAt1")]
- lines_start_at_one: bool,
+ lines_start_at_one: Option<bool>,
#[serde(rename = "columnsStartAt1")]
- columns_start_at_one: bool,
- path_format: String,
- supports_variable_type: bool,
- supports_variable_paging: bool,
- supports_run_in_terminal_request: bool,
- supports_memory_references: bool,
- supports_progress_reporting: bool,
- supports_invalidated_event: bool,
+ columns_start_at_one: Option<bool>,
+ path_format: Option<String>,
+ supports_variable_type: Option<bool>,
+ supports_variable_paging: Option<bool>,
+ supports_run_in_terminal_request: Option<bool>,
+ supports_memory_references: Option<bool>,
+ supports_progress_reporting: Option<bool>,
+ supports_invalidated_event: Option<bool>,
}
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
@@ -415,19 +417,19 @@ impl Client {
pub async fn initialize(&mut self, adapter_id: String) -> Result<()> {
let args = InitializeArguments {
- client_id: "hx".to_owned(),
- client_name: "helix".to_owned(),
+ client_id: Some("hx".to_owned()),
+ client_name: Some("helix".to_owned()),
adapter_id,
- locale: "en-us".to_owned(),
- lines_start_at_one: true,
- columns_start_at_one: true,
- path_format: "path".to_owned(),
- supports_variable_type: false,
- supports_variable_paging: false,
- supports_run_in_terminal_request: false,
- supports_memory_references: false,
- supports_progress_reporting: true,
- supports_invalidated_event: true,
+ locale: Some("en-us".to_owned()),
+ lines_start_at_one: Some(true),
+ columns_start_at_one: Some(true),
+ path_format: Some("path".to_owned()),
+ supports_variable_type: Some(false),
+ supports_variable_paging: Some(false),
+ supports_run_in_terminal_request: Some(false),
+ supports_memory_references: Some(false),
+ supports_progress_reporting: Some(true),
+ supports_invalidated_event: Some(true),
};
let response = self