From 42866957964aa698d53f222395dbd1e334e77fdd Mon Sep 17 00:00:00 2001 From: uga-rosa Date: Tue, 16 Jul 2024 01:12:01 +0900 Subject: [PATCH] fix: calls by cmp.complete ignore the keyword_length option --- lua/cmp_dictionary/source.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/cmp_dictionary/source.lua b/lua/cmp_dictionary/source.lua index 318acb5..e463558 100644 --- a/lua/cmp_dictionary/source.lua +++ b/lua/cmp_dictionary/source.lua @@ -60,6 +60,12 @@ function source:complete(request, callback) isIncomplete = #req < opts.exact_length end + -- Calls by cmp.complete ignore the keyword_length. + if #req < request.keyword_length then + callback({ items = {}, isIncomplete = true }) + return + end + local items if opts.first_case_insensitive then if is_capital(req) then