Document cmd.ConfirmBehavior options (#1503)
This commit is contained in:
@@ -218,6 +218,14 @@ NOTE: `<Cmd>lua require('cmp').complete()<CR>` can be used to call these functio
|
|||||||
If you didn't select any item and the option table contains `select = true`,
|
If you didn't select any item and the option table contains `select = true`,
|
||||||
nvim-cmp will automatically select the first item.
|
nvim-cmp will automatically select the first item.
|
||||||
|
|
||||||
|
You can control, how the completion item is injected into
|
||||||
|
the file through the `behavior` option:
|
||||||
|
|
||||||
|
`behavior=cmd.ConfirmBehavior.Insert`: inserts the selected item and
|
||||||
|
moves adjacent text to the right (default).
|
||||||
|
`bheavior=cmd.ConfirmBehavior.Replace`: replaces adjecent text with
|
||||||
|
the selected item.
|
||||||
|
|
||||||
*cmp.event:on* (%EVENT_NAME%, callback)
|
*cmp.event:on* (%EVENT_NAME%, callback)
|
||||||
Subscribe to nvim-cmp's event. Events are listed below.
|
Subscribe to nvim-cmp's event. Events are listed below.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user