From f7857fcb98e52899eb06f07ecb972a430d0de6e0 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Fri, 3 Jan 2025 11:12:46 -0500 Subject: [PATCH] fix: ignore non custom/customlist completion types Related to #849 --- lua/blink/cmp/sources/cmdline/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/blink/cmp/sources/cmdline/init.lua b/lua/blink/cmp/sources/cmdline/init.lua index 81ab4a15..5c6e0f6d 100644 --- a/lua/blink/cmp/sources/cmdline/init.lua +++ b/lua/blink/cmp/sources/cmdline/init.lua @@ -40,7 +40,9 @@ function cmdline:get_completions(context, callback) local query = (text_before_argument .. current_arg_prefix):gsub([[\\]], [[\\\\]]) local completion_type = vim.fn.getcmdcompltype() - if completion_type == '' then completion_type = 'cmdline' end + if not vim.startswith(completion_type, 'custom,') and not vim.startswith(completion_type, 'customlist,') then + completion_type = 'cmdline' + end local completions = vim.fn.getcompletion(query, completion_type) -- Special case for files, escape special characters