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:

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:

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:

Warning: not yet implemented.

Type: null or anything or raw lua code

Default: null

Plugin default: null

Declared by:

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:

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:

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:

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:

The name of the source.

Type: null or string or raw lua code

Default: null

Plugin default: null

Example: "LSP"

Declared by:

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:

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:

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:

Whether or not to show the items.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

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:

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: