summaryrefslogtreecommitdiff
path: root/support/texlab/src/client.rs
blob: bed6c3b8c8a8c1bb106d5e7b342296e21ccb0b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
}