A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/edi/lsp_impl.rs')
-rw-r--r--src/edi/lsp_impl.rs37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/edi/lsp_impl.rs b/src/edi/lsp_impl.rs
index f7e617b..19ad79b 100644
--- a/src/edi/lsp_impl.rs
+++ b/src/edi/lsp_impl.rs
@@ -86,7 +86,12 @@ impl crate::edi::Editor {
self.text.set_inlay(x);
})
});
- self.requests.document_highlights.poll(|x, _| x.ok());
+ self.requests.document_highlights.poll(|x, _| {
+ x.ok().map(|mut x| {
+ x.sort_unstable_by_key(|x| x.range.start);
+ x
+ })
+ });
self.requests.diag.poll(|x, _| x.ok().flatten());
if let CompletionState::Complete(rq) = &mut self.requests.complete
{
@@ -190,7 +195,35 @@ impl crate::edi::Editor {
})
});
}
- _ => {}
+ Some(crate::gotolist::O::Bmk) => {}
+ Some(crate::gotolist::O::Incoming(x)) => {
+ x.poll(|x, _| {
+ let x = x.ok()?;
+ z.data.0 = x
+ .into_iter()
+ .map(|x| {
+ let y = Some(x.from.name.clone());
+ (GoTo::from(x), y)
+ })
+ .collect();
+ Some(())
+ });
+ }
+ Some(crate::gotolist::O::Outgoing(x)) => {
+ x.poll(|x, _| {
+ let x = x.ok()?;
+ z.data.0 = x
+ .into_iter()
+ .map(|x| {
+ let y = Some(x.to.name.clone());
+ (GoTo::from(x), y)
+ })
+ .collect();
+ Some(())
+ });
+ }
+
+ None => {}
},
_ => {}
}