aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/mod.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-05-07 08:19:45 +0000
committerBlaž Hrastnik2021-05-07 08:19:45 +0000
commitff84c8e394391e0f0f05dc8f5281cba17405e5b8 (patch)
treec3815f2658d0a71cfcd6fc5fa527f56f30b338de /helix-term/src/ui/mod.rs
parent87e7a0de3fae7ccdd7e2b69908a8875eeb49f24c (diff)
Command mode: Per command completers.
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r--helix-term/src/ui/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 105ba7ad..a16b7ef0 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -114,6 +114,9 @@ pub fn file_picker(root: PathBuf) -> Picker<PathBuf> {
pub mod completers {
use crate::ui::prompt::Completion;
use std::borrow::Cow;
+
+ pub type Completer = fn(&str) -> Vec<Completion>;
+
// TODO: we could return an iter/lazy thing so it can fetch as many as it needs.
pub fn filename(input: &str) -> Vec<Completion> {
// Rust's filename handling is really annoying.