From 52a448ca246d60f4cf88bdcde73bfed0f989c848 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 3 Aug 2026 14:32:32 +0800 Subject: chore: add EntryFallback completion support Add `#[completion(EntryFallback)]` syntax to enable custom completion suggestions for unmatched entries, merging fallback results with default completions via `Suggest::combine()`. --- mingling_core/src/comp.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mingling_core') diff --git a/mingling_core/src/comp.rs b/mingling_core/src/comp.rs index a4e4f0b..021793b 100644 --- a/mingling_core/src/comp.rs +++ b/mingling_core/src/comp.rs @@ -163,7 +163,9 @@ impl CompletionHelper { } None => { trace!("using default completion"); - default_completion::

(ctx) + let fallback = P::do_comp(&P::build_entry_fallback(vec![]), ctx); + let default = default_completion::

(ctx); + fallback.combine(default) } } } -- cgit