Skip to content

Commit

Permalink
fix: ignore non custom/customlist completion types
Browse files Browse the repository at this point in the history
Related to #849
  • Loading branch information
Saghen committed Jan 3, 2025
1 parent a8957ba commit f7857fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/blink/cmp/sources/cmdline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7857fc

Please sign in to comment.