From 21af9ba4f0f56712a00ebce124bfbabd521a72af Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 12 Mar 2022 14:08:39 +0100 Subject: [PATCH] minor: Pad type inlay hints if no colons are requested --- crates/rust-analyzer/src/to_proto.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index fd6602624f..2faef70072 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -437,7 +437,8 @@ pub(crate) fn inlay_hint( }, tooltip: None, padding_left: Some(match inlay_hint.kind { - InlayKind::TypeHint | InlayKind::ParameterHint => false, + InlayKind::TypeHint => !render_colons, + InlayKind::ParameterHint => false, InlayKind::ChainingHint => true, }), padding_right: Some(match inlay_hint.kind {