diff options
Diffstat (limited to 'crates/ra_lsp_server/src/req.rs')
-rw-r--r-- | crates/ra_lsp_server/src/req.rs | 27 |
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 | |||
200 | pub enum InlayHints {} | ||
201 | |||
202 | impl 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")] | ||
210 | pub struct InlayHintsParams { | ||
211 | pub text_document: TextDocumentIdentifier, | ||
212 | } | ||
213 | |||
214 | #[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] | ||
215 | pub enum InlayKind { | ||
216 | LetBindingType, | ||
217 | ClosureParameterType, | ||
218 | } | ||
219 | |||
220 | #[derive(Debug, Deserialize, Serialize)] | ||
221 | pub struct InlayHint { | ||
222 | pub range: Range, | ||
223 | pub kind: InlayKind, | ||
224 | pub label: String, | ||
225 | } | ||