diff options
author | Cole Helbling | 2021-11-20 21:03:39 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-02-17 05:02:42 +0000 |
commit | 6118486eb2dd7ed680ff38a7cc024dbfb26fbb7f (patch) | |
tree | 2b1e19fe86bc9beee95c88b0e9fa9f9c1d66eae5 /helix-term/src/commands/dap.rs | |
parent | a1207fd7683c2e038df923704bb5790c6cdaefea (diff) |
helix-term: implement buffer completer
In order to implement this completer, the completion function needs to
be able to access the compositor's context (to allow it to get the
list of buffers currently open in the context's editor).
Diffstat (limited to 'helix-term/src/commands/dap.rs')
-rw-r--r-- | helix-term/src/commands/dap.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/helix-term/src/commands/dap.rs b/helix-term/src/commands/dap.rs index 9da2715f..925c65c1 100644 --- a/helix-term/src/commands/dap.rs +++ b/helix-term/src/commands/dap.rs @@ -361,8 +361,9 @@ fn debug_parameter_prompt( let completer = match field_type { "filename" => ui::completers::filename, "directory" => ui::completers::directory, - _ => |_input: &str| Vec::new(), + _ => ui::completers::none, }; + Prompt::new( format!("{}: ", name).into(), None, @@ -696,7 +697,7 @@ pub fn dap_edit_condition(cx: &mut Context) { let mut prompt = Prompt::new( "condition:".into(), None, - |_input: &str| Vec::new(), + ui::completers::none, move |cx, input: &str, event: PromptEvent| { if event != PromptEvent::Validate { return; @@ -740,7 +741,7 @@ pub fn dap_edit_log(cx: &mut Context) { let mut prompt = Prompt::new( "log-message:".into(), None, - |_input: &str| Vec::new(), + ui::completers::none, move |cx, input: &str, event: PromptEvent| { if event != PromptEvent::Validate { return; |