Improve inlay hinting for types

Add hints for types in for loop expressions.
Resolve types for every tuple parameter.
Refactor the code.
This commit is contained in:
Kirill Bulatov 2019-07-26 14:10:29 +03:00
parent 4647e89def
commit 5169a9d498
3 changed files with 130 additions and 66 deletions

View file

@ -897,6 +897,9 @@ pub fn handle_inlay_hints(
kind: match api_type.kind {
ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType,
ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType,
ra_ide_api::InlayKind::ForExpressionBindingType => {
InlayKind::ForExpressionBindingType
}
},
})
.collect())

View file

@ -215,6 +215,7 @@ pub struct InlayHintsParams {
pub enum InlayKind {
LetBindingType,
ClosureParameterType,
ForExpressionBindingType,
}
#[derive(Debug, Deserialize, Serialize)]