aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/req.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/req.rs')
-rw-r--r--crates/ra_lsp_server/src/req.rs22
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
67pub enum SelectionRangeRequest {}
68
69impl 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")]
77pub struct SelectionRangeParams {
78 pub text_document: TextDocumentIdentifier,
79 pub positions: Vec<Position>,
80}
81
82#[derive(Serialize, Debug)]
83#[serde(rename_all = "camelCase")]
84pub struct SelectionRange {
85 pub range: Range,
86 pub parent: Option<Box<SelectionRange>>,
87}
88
67pub enum FindMatchingBrace {} 89pub enum FindMatchingBrace {}
68 90
69impl Request for FindMatchingBrace { 91impl Request for FindMatchingBrace {