on master help sign in
types: capitalize ID in names

Part of LLDB integration

commitcc650c7f4f7e63d9417ceb3a0f302a575297dd98 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSat 14 Aug 2021, 11:01 (5 years ago) parentb3be6b2
1 file changed+26−24
helix-dap/src/client.rs+26−24
helix-dap/src/client.rs+26−24
@@ -35,21 +35,23 @@ pub struct DebuggerCapabilities {
3535#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
3636#[serde(rename_all = "camelCase")]
3737struct InitializeArguments {
38− client_id: String,
39− client_name: String,
38+ #[serde(rename = "clientID")]
39+ client_id: Option<String>,
40+ client_name: Option<String>,
41+ #[serde(rename = "adapterID")]
4042 adapter_id: String,
41− locale: String,
43+ locale: Option<String>,
4244 #[serde(rename = "linesStartAt1")]
43− lines_start_at_one: bool,
45+ lines_start_at_one: Option<bool>,
4446 #[serde(rename = "columnsStartAt1")]
45− columns_start_at_one: bool,
46− path_format: String,
47− supports_variable_type: bool,
48− supports_variable_paging: bool,
49− supports_run_in_terminal_request: bool,
50− supports_memory_references: bool,
51− supports_progress_reporting: bool,
52− supports_invalidated_event: bool,
47+ columns_start_at_one: Option<bool>,
48+ path_format: Option<String>,
49+ supports_variable_type: Option<bool>,
50+ supports_variable_paging: Option<bool>,
51+ supports_run_in_terminal_request: Option<bool>,
52+ supports_memory_references: Option<bool>,
53+ supports_progress_reporting: Option<bool>,
54+ supports_invalidated_event: Option<bool>,
5355}
5456
5557#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
@@ -415,19 +417,19 @@ impl Client {
415417
416418 pub async fn initialize(&mut self, adapter_id: String) -> Result<()> {
417419 let args = InitializeArguments {
418− client_id: "hx".to_owned(),
419− client_name: "helix".to_owned(),
420+ client_id: Some("hx".to_owned()),
421+ client_name: Some("helix".to_owned()),
420422 adapter_id,
421− locale: "en-us".to_owned(),
422− lines_start_at_one: true,
423− columns_start_at_one: true,
424− path_format: "path".to_owned(),
425− supports_variable_type: false,
426− supports_variable_paging: false,
427− supports_run_in_terminal_request: false,
428− supports_memory_references: false,
429− supports_progress_reporting: true,
430− supports_invalidated_event: true,
423+ locale: Some("en-us".to_owned()),
424+ lines_start_at_one: Some(true),
425+ columns_start_at_one: Some(true),
426+ path_format: Some("path".to_owned()),
427+ supports_variable_type: Some(false),
428+ supports_variable_paging: Some(false),
429+ supports_run_in_terminal_request: Some(false),
430+ supports_memory_references: Some(false),
431+ supports_progress_reporting: Some(true),
432+ supports_invalidated_event: Some(true),
431433 };
432434
433435 let response = self