plugins.cmp.cmdline

Options provided to the require('cmp').setup.cmdline function.

Type: attribute set of (attribute set of anything)

Default: { }

Example:

{
  "/" = {
    mapping = {
      __raw = "cmp.mapping.preset.cmdline()";
    };
    sources = [
      {
        name = "buffer";
      }
    ];
  };
  ":" = {
    mapping = {
      __raw = "cmp.mapping.preset.cmdline()";
    };
    sources = [
      {
        name = "path";
      }
      {
        name = "cmdline";
        option = {
          ignore_cmds = [
            "Man"
            "!"
          ];
        };
      }
    ];
  };
}

Declared by:

plugins.cmp.cmdline.<name>.experimental

Experimental features.

Type: null or (attribute set of anything)

Default: null

Declared by:

plugins.cmp.cmdline.<name>.mapping

cmp mappings declaration. See :h cmp-mapping for more information.

Type: (attribute set of lua code string) or raw lua code

Default: { }

Example:

{
  "<C-Space>" = "cmp.mapping.complete()";
  "<C-d>" = "cmp.mapping.scroll_docs(-4)";
  "<C-e>" = "cmp.mapping.close()";
  "<C-f>" = "cmp.mapping.scroll_docs(4)";
  "<CR>" = "cmp.mapping.confirm({ select = true })";
  "<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
  "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
}

Declared by:

plugins.cmp.cmdline.<name>.preselect

  • “cmp.PreselectMode.Item”: nvim-cmp will preselect the item that the source specified.
  • “cmp.PreselectMode.None”: nvim-cmp will not preselect any items.

Type: null or lua code string

Default: null

Plugin default: "cmp.PreselectMode.Item"

Declared by: