# cmp-cmdline **Repository Path**: hello-luiswu/cmp-cmdline ## Basic Information - **Project Name**: cmp-cmdline - **Description**: nvim 命令补全插件 - **Primary Language**: Lua - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-24 - **Last Updated**: 2023-07-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cmp-cmdline nvim-cmp source for vim's cmdline. # Setup Completions for `/` search based on current buffer: ```lua -- `/` cmdline setup. cmp.setup.cmdline('/', { mapping = cmp.mapping.preset.cmdline(), sources = { { name = 'buffer' } } }) ``` Completions for command mode: ```lua -- `:` 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](https://github.com/hrsh7th/cmp-buffer) is needed. # Option ### ignore_cmds: string[] Default: `{ "Man", "!" }` You can specify ignore command name.