Deserialize more LSP inlay hint information

This commit is contained in:
Kirill Bulatov 2023-06-13 16:34:38 +03:00
parent f155f5ded7
commit 8acc5cf8f4
4 changed files with 56 additions and 7 deletions

View file

@ -306,11 +306,20 @@ impl DisplayMap {
let new_inlays = to_insert
.into_iter()
.map(|(inlay_id, hint_anchor, hint)| {
let mut text = hint.text();
// TODO kb styling instead?
if hint.padding_right {
text.push(' ');
}
if hint.padding_left {
text.insert(0, ' ');
}
(
inlay_id,
InlayProperties {
position: hint_anchor.bias_left(&buffer_snapshot),
text: hint.text(),
text,
},
)
})