File tree 1 file changed +5
-6
lines changed
lua/blink/cmp/sources/lib
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 71
71
function sources_context :get_completions_for_sources (sources , context )
72
72
local enabled_sources = vim .tbl_keys (sources )
73
73
--- @type blink.cmp.SourceProvider[]
74
- local non_fallback_sources = vim .tbl_filter (
75
- function (source )
76
- return source .config .fallback_for == nil or # source .config .fallback_for (context , enabled_sources ) == 0
77
- end ,
78
- vim .tbl_values (sources )
79
- )
74
+ local non_fallback_sources = vim .tbl_filter (function (source )
75
+ local fallbacks = source .config .fallback_for and source .config .fallback_for (context , enabled_sources ) or {}
76
+ fallbacks = vim .tbl_filter (function (fallback ) return sources [fallback ] end , fallbacks )
77
+ return # fallbacks == 0
78
+ end , vim .tbl_values (sources ))
80
79
81
80
-- get completions for each non-fallback source
82
81
local tasks = vim .tbl_map (function (source )
You can’t perform that action at this time.
0 commit comments