blob: 1b5849d60251e6619389b0329a37c5c15f75f74a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# 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.
|