1

Regenerate nvim config

This commit is contained in:
2024-06-02 03:29:20 +02:00
parent 75eea0c030
commit ef2e28883d
5576 changed files with 604886 additions and 503 deletions

View File

@ -0,0 +1,52 @@
# 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.
### treat_trailing_slash: boolean
Default: `true`
`vim.fn.getcompletion` can return path items.
unfortunately, that items has trailing slash so we don't narrowing with next directory with pressing `/`.
if you turnd on this option, `cmp-cmdline` removes trailing slash automatically.