aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp/src/client.rs')
-rw-r--r--helix-lsp/src/client.rs19
1 files changed, 17 insertions, 2 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 9187a61e..f6cec6aa 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -322,6 +322,16 @@ impl Client {
content_format: Some(vec![lsp::MarkupKind::Markdown]),
..Default::default()
}),
+ signature_help: Some(lsp::SignatureHelpClientCapabilities {
+ signature_information: Some(lsp::SignatureInformationSettings {
+ documentation_format: Some(vec![lsp::MarkupKind::Markdown]),
+ parameter_information: Some(lsp::ParameterInformationSettings {
+ label_offset_support: Some(true),
+ }),
+ active_parameter_support: Some(true),
+ }),
+ ..Default::default()
+ }),
rename: Some(lsp::RenameClientCapabilities {
dynamic_registration: Some(false),
prepare_support: Some(false),
@@ -646,7 +656,12 @@ impl Client {
text_document: lsp::TextDocumentIdentifier,
position: lsp::Position,
work_done_token: Option<lsp::ProgressToken>,
- ) -> impl Future<Output = Result<Value>> {
+ ) -> Option<impl Future<Output = Result<Value>>> {
+ let capabilities = self.capabilities.get().unwrap();
+
+ // Return early if signature help is not supported
+ capabilities.signature_help_provider.as_ref()?;
+
let params = lsp::SignatureHelpParams {
text_document_position_params: lsp::TextDocumentPositionParams {
text_document,
@@ -657,7 +672,7 @@ impl Client {
// lsp::SignatureHelpContext
};
- self.call::<lsp::request::SignatureHelpRequest>(params)
+ Some(self.call::<lsp::request::SignatureHelpRequest>(params))
}
pub fn text_document_hover(