From 6118486eb2dd7ed680ff38a7cc024dbfb26fbb7f Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Sat, 20 Nov 2021 13:03:39 -0800 Subject: 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). --- helix-term/src/commands/dap.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'helix-term/src/commands') 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; -- cgit v1.2.3-70-g09d2