nvim: Improve cmdline completion
When completing in command line I want the completion canditates to be displayed, but *not* selected on confirmation. By doing so, it makes it almost impossible to quickly quit with ':q' or write with ':w' for example, as those always try to expand themselves automatically into completion items. This commit changes the default behavior for command mode to show completions but not auto accept any on confirmation, instead simply invoking whatever is currently on the command line (as if we had no completion plugin running).
This commit is contained in:
parent
ce9f101024
commit
643d282bac
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ cmp.setup({
|
|||
end
|
||||
end,
|
||||
s = cmp.mapping.confirm({ select = true }),
|
||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }), -- disable selection in cmd mode
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
|
|
Loading…
Reference in a new issue