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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use ;
use crateLspMessage;
/// Receiver half of the server-to-editor push channel.
///
/// The [`CodeMirror`] component drains this and forwards each [`LspMessage`] to
/// the editor's LSP client via `Cmd::LspMessageSend`. It carries both async
/// replies and server-initiated messages (e.g.
/// `textDocument/publishDiagnostics` diagnostics) uniformly -- anything the
/// server pushes, whenever it pushes it.
///
/// [`CodeMirror`]: crate::code_mirror::CodeMirror
pub type LspMessageRx = ;
/// Sender half of the server-to-editor push channel, handed to an
/// [`LspServerAsync`] so it can emit messages to the editor at any time.
///
/// Unlike the synchronous [`LspServer`] -- whose only output is the `Vec` it
/// *returns* from handling a message -- an async / worker-backed server holds
/// an `LspPusher` and pushes onto it whenever it has something to say: a reply
/// that arrives later (e.g. from a Web Worker), or an unprompted notification
/// like `textDocument/publishDiagnostics`.
///
/// Cloneable, so the server can keep one copy to push from and move others into
/// worker message callbacks.
///
/// [`LspServerAsync`]: crate::lsp::lsp_server_async::LspServerAsync
/// [`LspServer`]: crate::lsp::lsp_server::LspServer