Add inlay hint settings

This commit is contained in:
Kirill Bulatov
2023-06-29 22:25:49 +03:00
parent ea837a183b
commit 1ed52276e0
4 changed files with 75 additions and 4 deletions
+18
View File
@@ -229,4 +229,22 @@ impl InlayCache {
to_insert,
}
}
pub fn clear(&mut self) -> Vec<InlayId> {
self.inlays_per_buffer
.drain()
.map(|(_, buffer_inlays)| {
buffer_inlays
.inlays_per_excerpts
.into_iter()
.map(|(_, excerpt_inlays)| {
excerpt_inlays
.into_ordered_elements()
.map(|(_, (id, _))| id)
})
.flatten()
})
.flatten()
.collect()
}
}