aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/client.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 9fa118fb..9cb7c147 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -315,6 +315,9 @@ impl Client {
execute_command: Some(lsp::DynamicRegistrationClientCapabilities {
dynamic_registration: Some(false),
}),
+ inlay_hint: Some(lsp::InlayHintWorkspaceClientCapabilities {
+ refresh_support: Some(false),
+ }),
..Default::default()
}),
text_document: Some(lsp::TextDocumentClientCapabilities {
@@ -386,6 +389,10 @@ impl Client {
publish_diagnostics: Some(lsp::PublishDiagnosticsClientCapabilities {
..Default::default()
}),
+ inlay_hint: Some(lsp::InlayHintClientCapabilities {
+ dynamic_registration: Some(false),
+ resolve_support: None,
+ }),
..Default::default()
}),
window: Some(lsp::WindowClientCapabilities {
@@ -726,6 +733,31 @@ impl Client {
Some(self.call::<lsp::request::SignatureHelpRequest>(params))
}
+ pub fn text_document_range_inlay_hints(
+ &self,
+ text_document: lsp::TextDocumentIdentifier,
+ range: lsp::Range,
+ work_done_token: Option<lsp::ProgressToken>,
+ ) -> Option<impl Future<Output = Result<Value>>> {
+ let capabilities = self.capabilities.get().unwrap();
+
+ match capabilities.inlay_hint_provider {
+ Some(
+ lsp::OneOf::Left(true)
+ | lsp::OneOf::Right(lsp::InlayHintServerCapabilities::Options(_)),
+ ) => (),
+ _ => return None,
+ }
+
+ let params = lsp::InlayHintParams {
+ text_document,
+ range,
+ work_done_progress_params: lsp::WorkDoneProgressParams { work_done_token },
+ };
+
+ Some(self.call::<lsp::request::InlayHintRequest>(params))
+ }
+
pub fn text_document_hover(
&self,
text_document: lsp::TextDocumentIdentifier,