summaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
authorJan Hrastnik2021-02-21 22:43:28 +0000
committerBlaž Hrastnik2021-03-16 14:03:10 +0000
commit8a68a043400342a02496c4ff622dd86e6f40a89c (patch)
tree665194f964b704cc58894d776642fb8fb074b8cd /helix-lsp/src
parentd3ddc8dea6844f836199196c44b08e63fdf837d0 (diff)
gotodefiniton now runs but doesnt return anything
Diffstat (limited to 'helix-lsp/src')
-rw-r--r--helix-lsp/src/client.rs5
1 files changed, 4 insertions, 1 deletions
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::<lsp::request::GotoDefinition>(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)