mirror of
https://github.com/helix-editor/helix.git
synced 2025-01-19 21:47:07 +04:00
completion: Don't panic on timeout/no result, just do nothing.
This commit is contained in:
parent
3cbab20908
commit
6ec0f8e80f
@ -851,8 +851,10 @@ pub fn completion(cx: &mut Context) {
|
||||
.timeout(Duration::from_secs(2)),
|
||||
)
|
||||
.expect("completion failed!")
|
||||
.expect("completion failed!");
|
||||
.unwrap_or_default(); // if timeout, just return
|
||||
|
||||
// TODO: if no completion, show some message or something
|
||||
if !res.is_empty() {
|
||||
let picker = ui::Picker::new(
|
||||
res,
|
||||
|item| {
|
||||
@ -876,6 +878,8 @@ pub fn completion(cx: &mut Context) {
|
||||
},
|
||||
));
|
||||
|
||||
// TODO: when iterating over items, show the docs in popup
|
||||
// TODO!: when iterating over items, show the docs in popup
|
||||
|
||||
// language server client needs to be accessible via a registry of some sort
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user