Skip to content

Commit 9c9e0cc

Browse files
committed
feat: ignore empty fallback_for table
closes #122
1 parent d2140dc commit 9c9e0cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/blink/cmp/sources/lib/context.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ end
4747
--- @param context blink.cmp.Context
4848
--- @return blink.cmp.Task
4949
function sources_context:get_completions_for_sources(sources, context)
50-
local non_fallback_sources = vim.tbl_filter(function(source) return source.config.fallback_for == nil end, sources)
50+
local non_fallback_sources = vim.tbl_filter(
51+
function(source) return source.config.fallback_for == nil or #source.config.fallback_for == 0 end,
52+
sources
53+
)
5154

5255
-- get completions for each non-fallback source
5356
local tasks = vim.tbl_map(function(source)

0 commit comments

Comments
 (0)