From cee556eba5ff991fbfd6af49c5ef59882d65ea0b Mon Sep 17 00:00:00 2001 From: pynappo Date: Fri, 17 Jan 2025 12:49:22 -0800 Subject: [PATCH] fix: add exclusion for `custom,v:lua` completions (#1024) --- lua/blink/cmp/sources/cmdline/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/blink/cmp/sources/cmdline/init.lua b/lua/blink/cmp/sources/cmdline/init.lua index fff2c664..73312362 100644 --- a/lua/blink/cmp/sources/cmdline/init.lua +++ b/lua/blink/cmp/sources/cmdline/init.lua @@ -49,11 +49,12 @@ function cmdline:get_completions(context, callback) local completion_func = completion_args[2] -- Handle custom completions explicitly, since otherwise they won't work in input() mode (getcmdtype() == '@') - -- TODO: however, we cannot handle s: and completions. is there a better solution here where we can get - -- completions in input() mode without calling ourselves? + -- TODO: however, we cannot handle v:lua, s:, and completions. is there a better solution here where we can + -- get completions in input() mode without calling ourselves? if vim.startswith(completion_type, 'custom') and not vim.startswith(completion_func, 's:') + and not vim.startswith(completion_func, 'v:lua') and not vim.startswith(completion_func, '') then completions = vim.fn.call(completion_func, { current_arg_prefix, vim.fn.getcmdline(), vim.fn.getcmdpos() })