mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Add back colons around inlay hints
This commit is contained in:
parent
0f5df8e177
commit
4a6ee4517a
1 changed files with 6 additions and 2 deletions
|
@ -415,7 +415,11 @@ pub(crate) fn signature_help(
|
|||
|
||||
pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
|
||||
lsp_ext::InlayHint {
|
||||
label: inlay_hint.label.to_string(),
|
||||
label: match inlay_hint.kind {
|
||||
InlayKind::ParameterHint => format!("{}:", inlay_hint.label),
|
||||
InlayKind::TypeHint => format!(": {}", inlay_hint.label),
|
||||
InlayKind::ChainingHint => inlay_hint.label.to_string(),
|
||||
},
|
||||
position: match inlay_hint.kind {
|
||||
InlayKind::ParameterHint => position(line_index, inlay_hint.range.start()),
|
||||
InlayKind::TypeHint | InlayKind::ChainingHint => {
|
||||
|
@ -429,7 +433,7 @@ pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_e
|
|||
},
|
||||
tooltip: None,
|
||||
padding_left: Some(match inlay_hint.kind {
|
||||
InlayKind::TypeHint => true,
|
||||
InlayKind::TypeHint => false,
|
||||
InlayKind::ParameterHint => false,
|
||||
InlayKind::ChainingHint => true,
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue