From 3d64cf8356044fb272fd0a93e8235f967b9da156 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Fri, 13 Aug 2021 20:18:15 +0300 Subject: fix: move adapter_id out of DAP client --- helix-dap/examples/dap-basic.rs | 2 +- helix-dap/src/client.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-dap') diff --git a/helix-dap/examples/dap-basic.rs b/helix-dap/examples/dap-basic.rs index 68e8ab54..2e4ff2b1 100644 --- a/helix-dap/examples/dap-basic.rs +++ b/helix-dap/examples/dap-basic.rs @@ -17,7 +17,7 @@ pub async fn main() -> Result<()> { println!("create: {:?}", client); let mut client = client?; - println!("init: {:?}", client.initialize().await); + println!("init: {:?}", client.initialize("go".to_owned()).await); println!("caps: {:#?}", client.capabilities()); println!( "launch: {:?}", diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index cbb24d15..41e7dca6 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -350,11 +350,11 @@ impl Client { .expect("language server not yet initialized!") } - pub async fn initialize(&mut self) -> Result<()> { + pub async fn initialize(&mut self, adapter_id: String) -> Result<()> { let args = InitializeArguments { client_id: "hx".to_owned(), client_name: "helix".to_owned(), - adapter_id: "go".to_owned(), + adapter_id, locale: "en-us".to_owned(), lines_start_at_one: true, columns_start_at_one: true, -- cgit v1.2.3-70-g09d2