aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src/req.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-10 20:33:29 +0100
committerAleksey Kladov <[email protected]>2018-08-10 20:33:29 +0100
commit7c67612b8a894187fa3b64725531a5459f9211bf (patch)
tree9e2a536efa0c880d921fd8d4d74423afc9451fd4 /crates/server/src/req.rs
parent26262aaf05983c5b7f41cc438e287523268fe1eb (diff)
organizize
Diffstat (limited to 'crates/server/src/req.rs')
-rw-r--r--crates/server/src/req.rs41
1 files changed, 41 insertions, 0 deletions
diff --git a/crates/server/src/req.rs b/crates/server/src/req.rs
new file mode 100644
index 000000000..4e588159b
--- /dev/null
+++ b/crates/server/src/req.rs
@@ -0,0 +1,41 @@
1use languageserver_types::{TextDocumentIdentifier, Range};
2
3pub use languageserver_types::{
4 request::*, notification::*,
5 InitializeResult,
6};
7
8pub enum SyntaxTree {}
9
10impl Request for SyntaxTree {
11 type Params = SyntaxTreeParams;
12 type Result = String;
13 const METHOD: &'static str = "m/syntaxTree";
14}
15
16#[derive(Deserialize, Debug)]
17#[serde(rename_all = "camelCase")]
18pub struct SyntaxTreeParams {
19 pub text_document: TextDocumentIdentifier
20}
21
22pub enum ExtendSelection {}
23
24impl Request for ExtendSelection {
25 type Params = ExtendSelectionParams;
26 type Result = ExtendSelectionResult;
27 const METHOD: &'static str = "m/extendSelection";
28}
29
30#[derive(Deserialize, Debug)]
31#[serde(rename_all = "camelCase")]
32pub struct ExtendSelectionParams {
33 pub text_document: TextDocumentIdentifier,
34 pub selections: Vec<Range>,
35}
36
37#[derive(Serialize, Debug)]
38#[serde(rename_all = "camelCase")]
39pub struct ExtendSelectionResult {
40 pub selections: Vec<Range>,
41}