on master help sign in
fix: move adapter_id out of DAP client
3d64cf8Dmitry Sharshakov
helix-dap/examples/dap-basic.rs+1−1
@@ -17,7 +17,7 @@ pub async fn main() -> Result<()> {
17 println!("create: {:?}", client);
17 println!("create: {:?}", client);
18 let mut client = client?;
18 let mut client = client?;
19
19
20− println!("init: {:?}", client.initialize().await);
20+ println!("init: {:?}", client.initialize("go".to_owned()).await);
21 println!("caps: {:#?}", client.capabilities());
21 println!("caps: {:#?}", client.capabilities());
22 println!(
22 println!(
23 "launch: {:?}",
23 "launch: {:?}",
helix-dap/src/client.rs+2−2
@@ -350,11 +350,11 @@ impl Client {
350 .expect("language server not yet initialized!")
350 .expect("language server not yet initialized!")
351 }
351 }
352
352
353− pub async fn initialize(&mut self) -> Result<()> {
353+ pub async fn initialize(&mut self, adapter_id: String) -> Result<()> {
354 let args = InitializeArguments {
354 let args = InitializeArguments {
355 client_id: "hx".to_owned(),
355 client_id: "hx".to_owned(),
356 client_name: "helix".to_owned(),
356 client_name: "helix".to_owned(),
357− adapter_id: "go".to_owned(),
357+ adapter_id,
358 locale: "en-us".to_owned(),
358 locale: "en-us".to_owned(),
359 lines_start_at_one: true,
359 lines_start_at_one: true,
360 columns_start_at_one: true,
360 columns_start_at_one: true,