aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/req.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2019-07-22 19:52:47 +0100
committerKirill Bulatov <[email protected]>2019-07-22 21:25:13 +0100
commit8f3377d9f93a256f8e68ae183808fd767b529d18 (patch)
treea56a828eeba4301bbd816383abc8674a25996d85 /crates/ra_lsp_server/src/req.rs
parent25398ad30d6ffc07b3ca9ceee6a55f301973c155 (diff)
Code review fixes
Diffstat (limited to 'crates/ra_lsp_server/src/req.rs')
-rw-r--r--crates/ra_lsp_server/src/req.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs
index 8d39b04a7..916185f99 100644
--- a/crates/ra_lsp_server/src/req.rs
+++ b/crates/ra_lsp_server/src/req.rs
@@ -196,3 +196,30 @@ pub struct SourceChange {
196 pub workspace_edit: WorkspaceEdit, 196 pub workspace_edit: WorkspaceEdit,
197 pub cursor_position: Option<TextDocumentPositionParams>, 197 pub cursor_position: Option<TextDocumentPositionParams>,
198} 198}
199
200pub enum InlayHints {}
201
202impl Request for InlayHints {
203 type Params = InlayHintsParams;
204 type Result = Vec<InlayHint>;
205 const METHOD: &'static str = "rust-analyzer/inlayHints";
206}
207
208#[derive(Serialize, Deserialize, Debug)]
209#[serde(rename_all = "camelCase")]
210pub struct InlayHintsParams {
211 pub text_document: TextDocumentIdentifier,
212}
213
214#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)]
215pub enum InlayKind {
216 LetBindingType,
217 ClosureParameterType,
218}
219
220#[derive(Debug, Deserialize, Serialize)]
221pub struct InlayHint {
222 pub range: Range,
223 pub kind: InlayKind,
224 pub label: String,
225}