summaryrefslogtreecommitdiff
path: root/helix-lsp/src/client.rs
diff options
context:
space:
mode:
authorRobin2021-06-12 12:45:21 +0000
committerGitHub2021-06-12 12:45:21 +0000
commit9baf1ecc90117710e785467f59a99ee119f50c73 (patch)
tree3cb091df93ad455b5cca529f578e8df3995486c1 /helix-lsp/src/client.rs
parent44cc0d8eb0743101724fca8787217a9d0aa01bd4 (diff)
add symbol picker (#230)
* add symbol picker use the lsp document_symbol request * fix errors from merging in master * add docs for symbol picker
Diffstat (limited to 'helix-lsp/src/client.rs')
-rw-r--r--helix-lsp/src/client.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 070f90d1..9ca708a7 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -660,4 +660,17 @@ impl Client {
self.call::<lsp::request::References>(params)
}
+
+ pub fn document_symbols(
+ &self,
+ text_document: lsp::TextDocumentIdentifier,
+ ) -> impl Future<Output = Result<Value>> {
+ let params = lsp::DocumentSymbolParams {
+ text_document,
+ work_done_progress_params: lsp::WorkDoneProgressParams::default(),
+ partial_result_params: lsp::PartialResultParams::default(),
+ };
+
+ self.call::<lsp::request::DocumentSymbolRequest>(params)
+ }
}