merge: develop <--- feature/improve-cmp-cmdline
* HEAD
| \
| * 7c38526
<github@luxolus.com> nvim/plug: improve cmdline (:) completions
| /
| develop
Signed-off-by: Bazaah <github@luxolus.com>
This commit is contained in:
commit
5f07c09d46
|
@ -45,7 +45,6 @@ return function()
|
|||
['<C-Space>'] = kmap.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }),
|
||||
}
|
||||
defaults.mapping = mode.insert(defaults.mapping)
|
||||
defaults.mapping = mode.cmd(defaults.mapping)
|
||||
|
||||
-- Sources of auto completion
|
||||
--
|
||||
|
@ -53,7 +52,7 @@ return function()
|
|||
-- that is, 'path's will be shown before 'nvim_lsp's, etc
|
||||
defaults.sources = sources(
|
||||
{
|
||||
{ name = 'path', },
|
||||
{ name = 'async_path', },
|
||||
},
|
||||
{
|
||||
{ name = 'nvim_lsp', keyword_length = 2 },
|
||||
|
@ -91,4 +90,29 @@ return function()
|
|||
}
|
||||
|
||||
cmp.setup(util.mconfig('config.nvim-cmp', defaults))
|
||||
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = mode.cmd(),
|
||||
sources = sources(
|
||||
{
|
||||
{ name = 'async_path', max_item_count = 2 },
|
||||
},
|
||||
{
|
||||
{ name = 'cmdline_history', max_item_count = 2 },
|
||||
{ name = 'cmdline', max_item_count = 6 },
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
cmp.setup.cmdline({'/', '?', '@'}, {
|
||||
mapping = mode.cmd(),
|
||||
sources = sources(
|
||||
{
|
||||
{ name = 'cmdline_history', max_item_count = 1 },
|
||||
},
|
||||
{
|
||||
{ name = 'buffer', max_item_count = 9 },
|
||||
}
|
||||
)
|
||||
})
|
||||
end
|
||||
|
|
|
@ -149,8 +149,10 @@ local plugins = {
|
|||
|
||||
-- Other sources:
|
||||
{ 'hrsh7th/cmp-vsnip' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'FelipeLema/cmp-async-path' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/cmp-cmdline' },
|
||||
{ 'dmitmel/cmp-cmdline-history' },
|
||||
{ 'f3fora/cmp-spell',
|
||||
after = { 'lspconfig' },
|
||||
config = require 'psoxizsh.plugins.config.cmp-spell'
|
||||
|
|
Loading…
Reference in New Issue