mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Code review fixes
This commit is contained in:
parent
25398ad30d
commit
8f3377d9f9
4 changed files with 70 additions and 30 deletions
|
@ -196,3 +196,30 @@ pub struct SourceChange {
|
|||
pub workspace_edit: WorkspaceEdit,
|
||||
pub cursor_position: Option<TextDocumentPositionParams>,
|
||||
}
|
||||
|
||||
pub enum InlayHints {}
|
||||
|
||||
impl Request for InlayHints {
|
||||
type Params = InlayHintsParams;
|
||||
type Result = Vec<InlayHint>;
|
||||
const METHOD: &'static str = "rust-analyzer/inlayHints";
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct InlayHintsParams {
|
||||
pub text_document: TextDocumentIdentifier,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub enum InlayKind {
|
||||
LetBindingType,
|
||||
ClosureParameterType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct InlayHint {
|
||||
pub range: Range,
|
||||
pub kind: InlayKind,
|
||||
pub label: String,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue