diff options
Diffstat (limited to 'crates/ra_lsp_server/src/req.rs')
-rw-r--r-- | crates/ra_lsp_server/src/req.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs index 4f35ab9b5..6090eb7b9 100644 --- a/crates/ra_lsp_server/src/req.rs +++ b/crates/ra_lsp_server/src/req.rs | |||
@@ -64,6 +64,28 @@ pub struct ExtendSelectionResult { | |||
64 | pub selections: Vec<Range>, | 64 | pub selections: Vec<Range>, |
65 | } | 65 | } |
66 | 66 | ||
67 | pub enum SelectionRangeRequest {} | ||
68 | |||
69 | impl Request for SelectionRangeRequest { | ||
70 | type Params = SelectionRangeParams; | ||
71 | type Result = Vec<SelectionRange>; | ||
72 | const METHOD: &'static str = "textDocument/selectionRange"; | ||
73 | } | ||
74 | |||
75 | #[derive(Deserialize, Debug)] | ||
76 | #[serde(rename_all = "camelCase")] | ||
77 | pub struct SelectionRangeParams { | ||
78 | pub text_document: TextDocumentIdentifier, | ||
79 | pub positions: Vec<Position>, | ||
80 | } | ||
81 | |||
82 | #[derive(Serialize, Debug)] | ||
83 | #[serde(rename_all = "camelCase")] | ||
84 | pub struct SelectionRange { | ||
85 | pub range: Range, | ||
86 | pub parent: Option<Box<SelectionRange>>, | ||
87 | } | ||
88 | |||
67 | pub enum FindMatchingBrace {} | 89 | pub enum FindMatchingBrace {} |
68 | 90 | ||
69 | impl Request for FindMatchingBrace { | 91 | impl Request for FindMatchingBrace { |