1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:30:04 +08:00
SpaceVim/bundle/cmp-cmdline
2023-06-09 12:10:07 +08:00
..
after/plugin feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00
lua/cmp_cmdline fix(cmp): fix nvim-cmp support 2023-06-09 12:10:07 +08:00
LICENSE fix(cmp): fix nvim-cmp support 2023-06-09 12:10:07 +08:00
README.md fix(cmp): fix nvim-cmp support 2023-06-09 12:10:07 +08:00

cmp-cmdline

nvim-cmp source for vim's cmdline.

Setup

Completions for / search based on current buffer:

    -- `/` cmdline setup.
    cmp.setup.cmdline('/', {
      mapping = cmp.mapping.preset.cmdline(),
      sources = {
        { name = 'buffer' }
      }
    })

Completions for command mode:

    -- `:` cmdline setup.
    cmp.setup.cmdline(':', {
      mapping = cmp.mapping.preset.cmdline(),
      sources = cmp.config.sources({
        { name = 'path' }
      }, {
        {
          name = 'cmdline',
          option = {
            ignore_cmds = { 'Man', '!' }
          }
        }
      })
    })

For the buffer source to work, cmp-buffer is needed.

Option

ignore_cmds: string[]

Default: { "Man", "!" }

You can specify ignore command name.