From 8a68a043400342a02496c4ff622dd86e6f40a89c Mon Sep 17 00:00:00 2001 From: Jan Hrastnik Date: Sun, 21 Feb 2021 23:43:28 +0100 Subject: gotodefiniton now runs but doesnt return anything --- helix-lsp/src/client.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'helix-lsp/src') diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index a747dc55..f3d3b7e1 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -603,6 +603,8 @@ impl Client { let response = self.request::(params).await?; + println!("{:?}", response); + let items = match response { Some(lsp::GotoDefinitionResponse::Scalar(location)) => vec![location], Some(lsp::GotoDefinitionResponse::Array(location_vec)) => location_vec, @@ -613,10 +615,11 @@ impl Client { uri: location_link.target_uri, range: location_link.target_range, }; - location_vec.append(&mut link); + location_vec.push(link) }); location_vec } + None => Vec::new(), }; Ok(items) -- cgit v1.2.3-70-g09d2