diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-26 21:16:19 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-26 21:16:19 +0100 |
commit | dc6f0b5a4eaf0e9ac096551a9900a32a7efe742a (patch) | |
tree | efa51b228f5f8785bc46b2620ad766deeea7d877 /crates/ra_lsp_server/src | |
parent | 4647e89defd367a92d00d3bbb11c2463408bb3ad (diff) | |
parent | 5169a9d498c82ffd0a24a4cc640eb8232a3f7e21 (diff) |
Merge #1594
1594: Improve inlay hinting for types r=matklad a=SomeoneToIgnore
Add hints for types in for loop expressions.
Resolve types for every tuple parameter.
Refactor the code.

Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 3 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/req.rs | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 14619ede2..0b4493ce2 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -897,6 +897,9 @@ pub fn handle_inlay_hints( | |||
897 | kind: match api_type.kind { | 897 | kind: match api_type.kind { |
898 | ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType, | 898 | ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType, |
899 | ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType, | 899 | ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType, |
900 | ra_ide_api::InlayKind::ForExpressionBindingType => { | ||
901 | InlayKind::ForExpressionBindingType | ||
902 | } | ||
900 | }, | 903 | }, |
901 | }) | 904 | }) |
902 | .collect()) | 905 | .collect()) |
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs index 916185f99..96f6b1bc5 100644 --- a/crates/ra_lsp_server/src/req.rs +++ b/crates/ra_lsp_server/src/req.rs | |||
@@ -215,6 +215,7 @@ pub struct InlayHintsParams { | |||
215 | pub enum InlayKind { | 215 | pub enum InlayKind { |
216 | LetBindingType, | 216 | LetBindingType, |
217 | ClosureParameterType, | 217 | ClosureParameterType, |
218 | ForExpressionBindingType, | ||
218 | } | 219 | } |
219 | 220 | ||
220 | #[derive(Debug, Deserialize, Serialize)] | 221 | #[derive(Debug, Deserialize, Serialize)] |