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 or raw lua code
Default:
null
Plugin default: true
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 or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.deduplicate
Warning: not yet implemented.
Type: null or anything or raw lua code
Default:
null
Plugin 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 or raw lua code)) or raw lua code
Default:
null
Plugin default: [ ]
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, or raw lua code
Default:
null
Plugin 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, or raw lua code
Default:
null
Plugin default: 0
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
Plugin 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
Plugin 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 or raw lua code)) or raw lua code
Default:
null
Plugin default: null
Declared by:
plugins.blink-cmp.settings.sources.providers.<name>.override
Override source options.
Type: null or (attribute set of (anything or raw lua code)) or raw lua code
Default:
null
Plugin 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 or raw lua code
Default:
null
Plugin default: 0
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 or raw lua code
Default:
null
Plugin default: true
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, or raw lua code
Default:
null
Plugin default: 2000
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
Plugin default: lib.nixvim.mkRaw "function(_, items) return items end"
Example:
lib.nixvim.mkRaw "function(_, items)\n -- demote snippets\n for _, item in ipairs(items) do\n if item.kind == require('blink.cmp.types').CompletionItemKind.Snippet then\n item.score_offset = item.score_offset - 3\n end\n end\n\n -- filter out text items, since we have the buffer source\n return vim.tbl_filter(\n function(item) return item.kind ~= require('blink.cmp.types').CompletionItemKind.Text end,\n items\n )\nend\n"
Declared by: