summaryrefslogtreecommitdiff
path: root/support/texlab/src/client.rs
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-03 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2019-12-03 03:01:24 +0000
commitb8d4bb76703bcb15578e2b23c5d256532180b894 (patch)
treebedd1df7a00521a2bd986b3c0289d6556a59e39b /support/texlab/src/client.rs
parent02e4625a78a5029e8b5dc2a4ec70193b232f497e (diff)
CTAN sync 201912030301
Diffstat (limited to 'support/texlab/src/client.rs')
-rw-r--r--support/texlab/src/client.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/support/texlab/src/client.rs b/support/texlab/src/client.rs
new file mode 100644
index 0000000000..bed6c3b8c8
--- /dev/null
+++ b/support/texlab/src/client.rs
@@ -0,0 +1,35 @@
+use futures_boxed::boxed;
+use jsonrpc::client::Result;
+use jsonrpc_derive::{jsonrpc_client, jsonrpc_method};
+use lsp_types::*;
+
+#[jsonrpc_client(LatexLspClient)]
+pub trait LspClient {
+ #[jsonrpc_method("workspace/configuration", kind = "request")]
+ #[boxed]
+ async fn configuration(&self, params: ConfigurationParams) -> Result<serde_json::Value>;
+
+ #[jsonrpc_method("window/showMessage", kind = "notification")]
+ #[boxed]
+ async fn show_message(&self, params: ShowMessageParams);
+
+ #[jsonrpc_method("client/registerCapability", kind = "request")]
+ #[boxed]
+ async fn register_capability(&self, params: RegistrationParams) -> Result<()>;
+
+ #[jsonrpc_method("textDocument/publishDiagnostics", kind = "notification")]
+ #[boxed]
+ async fn publish_diagnostics(&self, params: PublishDiagnosticsParams);
+
+ #[jsonrpc_method("$/progress", kind = "notification")]
+ #[boxed]
+ async fn progress(&self, params: ProgressParams);
+
+ #[jsonrpc_method("window/workDoneProgress/create", kind = "request")]
+ #[boxed]
+ async fn work_done_progress_create(&self, params: WorkDoneProgressCreateParams) -> Result<()>;
+
+ #[jsonrpc_method("window/logMessage", kind = "notification")]
+ #[boxed]
+ async fn log_message(&self, params: LogMessageParams);
+}