plugins.blink-cmp.settings.sources.providers
Definition of completion providers.
Type: null or (attribute set of (attribute set of anything))
Default:
null
Example:
{
buffer = {
score_offset = -7;
};
lsp = {
fallbacks = [ ];
};
}
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.enabled
Whether or not to enable the provider.
Type: null or boolean
Default:
null
Example:
{
__raw = ''
function()
return true
end
'';
}
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.async
Whether blink should wait for the source to return before showing the completions.
Type: null or boolean
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.deduplicate
Warning: not yet implemented.
Type: null or anything
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.fallbacks
If this provider returns 0
items, it will fallback to these providers.
Type: null or (list of string)
Default:
null
Example:
[
"buffer"
]
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.max_items
Maximum number of items to display in the menu.
Type: null or (unsigned integer, meaning >=0)
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.min_keyword_length
Minimum number of characters in the keyword to trigger the provider.
Type: null or (unsigned integer, meaning >=0)
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.module
The module name to load.
Type: null or string or raw lua code
Default:
null
Example:
"blink.cmp.sources.lsp"
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.name
The name of the source.
Type: null or string or raw lua code
Default:
null
Example:
"LSP"
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.opts
Options for this provider.
Type: null or (attribute set of anything)
Default:
null
Example:
{ }
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.override
Override source options.
Type: null or (attribute set of anything)
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.score_offset
Boost/penalize the score of the items.
Type: null or signed integer
Default:
null
Example:
3
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.should_show_items
Whether or not to show the items.
Type: null or boolean
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.timeout_ms
How long to wait for the provider to return before showing completions and treating it as asynchronous.
Type: null or (unsigned integer, meaning >=0)
Default:
null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.transform_items
Function to transform the items before they’re returned.
Type: null or raw lua code
Default:
null
Example:
''
function(_, items)
-- demote snippets
for _, item in ipairs(items) do
if item.kind == require('blink.cmp.types').CompletionItemKind.Snippet then
item.score_offset = item.score_offset - 3
end
end
-- filter out text items, since we have the buffer source
return vim.tbl_filter(
function(item) return item.kind ~= require('blink.cmp.types').CompletionItemKind.Text end,
items
)
end
''
Declared by: